diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-11 14:26:22 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-11 14:26:22 +0200 |
commit | 775579a815a2e5dec3cf22736684fa3e92d1379c (patch) | |
tree | a6b1285f3c8b88552ed60f3fb1bba3075db811b8 /test | |
parent | b376384e7a0ff617bd61ef5340dfae60eadb0d3c (diff) | |
parent | 678ed4d6818e870de46ed91bd084889bed80c16d (diff) | |
download | bacon-775579a815a2e5dec3cf22736684fa3e92d1379c.tar.gz bacon-775579a815a2e5dec3cf22736684fa3e92d1379c.tar.xz bacon-775579a815a2e5dec3cf22736684fa3e92d1379c.zip |
Merge pull request #22 from godfat/pass-the-block
The methods in describe should also pass the block
Diffstat (limited to 'test')
-rw-r--r-- | test/spec_bacon.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb index 2d1ceef..e3e288e 100644 --- a/test/spec_bacon.rb +++ b/test/spec_bacon.rb @@ -375,6 +375,10 @@ describe "Methods" do 42 end + def the_towels + yield "DON'T PANIC" + end + it "should be accessible in a test" do the_meaning_of_life.should == 42 end @@ -383,6 +387,12 @@ describe "Methods" do it "should be accessible in a test" do the_meaning_of_life.should == 42 end + + it "should pass the block" do + the_towels do |label| + label.should == "DON'T PANIC" + end.should == true + end end end |