re-namespacing a touch
This commit is contained in:
20
map-mash/spec/views/maps/edit.html.erb_spec.rb
Normal file
20
map-mash/spec/views/maps/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/maps/edit.html.erb" do
|
||||
include MapsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:map] = @map = stub_model(Map,
|
||||
:new_record? => false,
|
||||
:name => "value for name"
|
||||
)
|
||||
end
|
||||
|
||||
it "renders the edit map form" do
|
||||
render
|
||||
|
||||
response.should have_tag("form[action=#{map_path(@map)}][method=post]") do
|
||||
with_tag('input#map_name[name=?]', "map[name]")
|
||||
end
|
||||
end
|
||||
end
|
21
map-mash/spec/views/maps/index.html.erb_spec.rb
Normal file
21
map-mash/spec/views/maps/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/maps/index.html.erb" do
|
||||
include MapsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:maps] = [
|
||||
stub_model(Map,
|
||||
:name => "value for name"
|
||||
),
|
||||
stub_model(Map,
|
||||
:name => "value for name"
|
||||
)
|
||||
]
|
||||
end
|
||||
|
||||
it "renders a list of maps" do
|
||||
render
|
||||
response.should have_tag("tr>td", "value for name".to_s, 2)
|
||||
end
|
||||
end
|
20
map-mash/spec/views/maps/new.html.erb_spec.rb
Normal file
20
map-mash/spec/views/maps/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/maps/new.html.erb" do
|
||||
include MapsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:map] = stub_model(Map,
|
||||
:new_record? => true,
|
||||
:name => "value for name"
|
||||
)
|
||||
end
|
||||
|
||||
it "renders new map form" do
|
||||
render
|
||||
|
||||
response.should have_tag("form[action=?][method=post]", maps_path) do
|
||||
with_tag("input#map_name[name=?]", "map[name]")
|
||||
end
|
||||
end
|
||||
end
|
15
map-mash/spec/views/maps/show.html.erb_spec.rb
Normal file
15
map-mash/spec/views/maps/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/maps/show.html.erb" do
|
||||
include MapsHelper
|
||||
before(:each) do
|
||||
assigns[:map] = @map = stub_model(Map,
|
||||
:name => "value for name"
|
||||
)
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
response.should have_text(/value\ for\ name/)
|
||||
end
|
||||
end
|
18
map-mash/spec/views/mash_tournaments/edit.html.erb_spec.rb
Normal file
18
map-mash/spec/views/mash_tournaments/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/mash_tournaments/edit.html.erb" do
|
||||
include MashTournamentsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:mash_tournament] = @mash_tournament = stub_model(MashTournament,
|
||||
:new_record? => false
|
||||
)
|
||||
end
|
||||
|
||||
it "renders the edit mash_tournament form" do
|
||||
render
|
||||
|
||||
response.should have_tag("form[action=#{mash_tournament_path(@mash_tournament)}][method=post]") do
|
||||
end
|
||||
end
|
||||
end
|
16
map-mash/spec/views/mash_tournaments/index.html.erb_spec.rb
Normal file
16
map-mash/spec/views/mash_tournaments/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/mash_tournaments/index.html.erb" do
|
||||
include MashTournamentsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:mash_tournaments] = [
|
||||
stub_model(MashTournament),
|
||||
stub_model(MashTournament)
|
||||
]
|
||||
end
|
||||
|
||||
it "renders a list of mash_tournaments" do
|
||||
render
|
||||
end
|
||||
end
|
18
map-mash/spec/views/mash_tournaments/new.html.erb_spec.rb
Normal file
18
map-mash/spec/views/mash_tournaments/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "/mash_tournaments/new.html.erb" do
|
||||
include MashTournamentsHelper
|
||||
|
||||
before(:each) do
|
||||
assigns[:mash_tournament] = stub_model(MashTournament,
|
||||
:new_record? => true
|
||||
)
|
||||
end
|
||||
|
||||
it "renders new mash_tournament form" do
|
||||
render
|
||||
|
||||
response.should have_tag("form[action=?][method=post]", mash_tournaments_path) do
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user