From 862244cf77543af841c67e380ef2ee160fed1d76 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Sat, 20 Mar 2010 04:19:18 -0400 Subject: methods in a context should serve as behavior that is inherited by sibling contexts --- test/spec_bacon.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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) -- cgit 1.4.1