summary refs log tree commit diff
path: root/test/spec_bacon.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec_bacon.rb')
-rw-r--r--test/spec_bacon.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb
index b1360be..79cdeb1 100644
--- a/test/spec_bacon.rb
+++ b/test/spec_bacon.rb
@@ -344,6 +344,22 @@ describe "shared/behaves_like" do
   behaves_like "another shared context"
 end
 
+describe "Methods" do
+  def the_meaning_of_life
+    42
+  end
+
+  it "should be accessible in a test" do
+    the_meaning_of_life.should == 42
+  end
+
+  describe "when in a sibling context" do
+    it "should be accessible in a test" do
+      the_meaning_of_life.should == 42
+    end
+  end
+end
+
 describe 'describe arguments' do
 
   def check(ctx,name)