Renamed default garden in /spec/factory/garden

"My Garden" was too generic and hard to test for -- tests like
rendered.should contain "Garden" are far too easy to have a false
positive pass.  So I renamed it "Springfield Community Garden" so that
false-positive passes were less likely.
This commit is contained in:
Skud
2013-01-13 21:32:54 +11:00
parent 8da9a13eae
commit 7579d894aa
5 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory :garden do
name 'My Garden'
name 'Springfield Community Garden'
owner
end
end

View File

@@ -7,7 +7,7 @@ describe Garden do
end
it "should have a slug" do
@garden.garden_slug.should == "member1-my-garden"
@garden.garden_slug.should == "member1-springfield-community-garden"
end
it "should have an owner" do

View File

@@ -16,7 +16,7 @@ describe Planting do
end
it "generates a location" do
@planting.location.should match /^member1's My Garden$/
@planting.location.should match /^member1's Springfield Community Garden$/
end
end

View File

@@ -12,7 +12,7 @@ describe "gardens/index" do
it "renders a list of gardens" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => "My Garden".to_s, :count => 2
assert_select "tr>td", :text => "Springfield Community Garden".to_s, :count => 2
end
end

View File

@@ -24,7 +24,7 @@ describe "plantings/index" do
it "renders a list of plantings" do
rendered.should contain 'Tomato'
rendered.should contain 'Maize'
rendered.should contain "member1's My Garden"
rendered.should contain "member1's Springfield Community Garden"
end
it "shows descriptions where they exist" do