mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-27 11:14:31 -04:00
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:
@@ -1,6 +1,6 @@
|
||||
FactoryGirl.define do
|
||||
factory :garden do
|
||||
name 'My Garden'
|
||||
name 'Springfield Community Garden'
|
||||
owner
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user