Skip to content

Commit

Permalink
Tasks with arguments: Refactoring to remove duplication in test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymarcano committed Jul 2, 2011
1 parent 946919c commit 8bd5f5e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions spec/cukesalad/specifics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ class NeedingSpecifics
module CukeSalad
describe Specifics do

it "has an item of specific information" do
something = NeedingSpecifics.new
something.understand_the "specific 'information'"
something.value_of(:specific).should == "information"
[ "specific 'information'",
'specific "information"'
].each do | specifics |
it "can find #{specifics}" do
something = NeedingSpecifics.new
something.understand_the specifics
something.value_of(:specific).should == "information"
end
end

it "has an item of specific information" do
something = NeedingSpecifics.new
something.understand_the 'specific "information"'
something.value_of(:specific).should == "information"
end

it "has items of specific information" do
something = NeedingSpecifics.new
something.understand_the "first 'item' second 'another'"
Expand Down

0 comments on commit 8bd5f5e

Please sign in to comment.