mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-27 03:02:43 -04:00
@@ -1,6 +1,9 @@
|
||||
- content_for :title, "Crops"
|
||||
- c = 0
|
||||
|
||||
%p
|
||||
= "Displaying #{@crops.length} crops"
|
||||
|
||||
%ul.thumbnails
|
||||
.row
|
||||
- @crops.each do |crop|
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
= content_for :title, "Growstuff members"
|
||||
|
||||
%p
|
||||
= "Displaying #{@members.length} members"
|
||||
|
||||
%ul.thumbnails
|
||||
- @members.each do |m|
|
||||
%li.span2
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
= content_for :title, "Recent Growstuff member updates"
|
||||
|
||||
%p
|
||||
= "Displaying #{@updates.length} updates"
|
||||
|
||||
- @updates.each do |update|
|
||||
= render :partial => "single", :locals => { :update => update, :subject => true }
|
||||
= render :partial => "single", :locals => { :update => update, :subject => true }
|
||||
|
||||
= link_to 'New Update', new_update_path
|
||||
|
||||
@@ -20,7 +20,12 @@ describe "crops/index" do
|
||||
assert_select "a", :text => "Maize"
|
||||
assert_select "a", :text => "Tomato"
|
||||
end
|
||||
|
||||
|
||||
it "counts the number of crops" do
|
||||
render
|
||||
rendered.should contain "Displaying 2 crops"
|
||||
end
|
||||
|
||||
context "logged out" do
|
||||
it "doesn't show the new crop link if logged out" do
|
||||
render
|
||||
|
||||
@@ -27,4 +27,9 @@ describe "members/index" do
|
||||
rendered.should contain "bob"
|
||||
rendered.should_not contain "bob..."
|
||||
end
|
||||
|
||||
it "counts the number of members" do
|
||||
rendered.should contain "Displaying 2 members"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -29,4 +29,10 @@ describe "updates/index" do
|
||||
assert_select "div.update>div.update-body",
|
||||
:text => "MyText".to_s, :count => 2
|
||||
end
|
||||
|
||||
it "counts the number of updates" do
|
||||
render
|
||||
rendered.should contain "Displaying 2 updates"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user