Skip to content

Commit

Permalink
Refactored specs to reflect changes in the markup.
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Apr 21, 2010
1 parent 6be92a4 commit a68c405
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion features/plain/changes_view_improvements.feature
Expand Up @@ -30,5 +30,5 @@ Feature: Changes view improvements

Examples: Changes notices
| link | notice |
| merge changes | This change the source file. Unless you use source control, you may lose all changes |
| merge changes | This will change the source file. Unless you use source control, you may lose all changes |
| merge system | This change will update the system feature |
12 changes: 6 additions & 6 deletions spec/views/features/_legend.html.erb_spec.rb
Expand Up @@ -7,15 +7,15 @@
end

it "should have a legend displaying system changes as green" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gd"} do |content|
content.should contain "Removing from file"
end
end
end

it "should have a legend displaying file changes as red" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gi"} do |content|
content.should contain "Adding to file"
end
Expand All @@ -29,15 +29,15 @@
end

it "should have a legend displaying system changes as green" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gi"} do |content|
content.should contain "Adding to system"
end
end
end

it "should have a legend displaying file changes as red" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gd"} do |content|
content.should contain "Removing from system"
end
Expand All @@ -50,15 +50,15 @@
render :locals => {:diff_from => "system", :diff_to => "file", :change => true}
end
it "should display a different copy for changes to the system" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gd"} do |content|
content.should contain "Changes to the system"
end
end
end

it "should display a different copy for changes to the file" do
response.should have_selector :div, attribute = {:id => "legend"} do |legend_wrapper|
response.should have_selector :span, attribute = {:id => "legend"} do |legend_wrapper|
legend_wrapper.should have_selector :span, attribute = {:class => "gi"} do |content|
content.should contain "Changes to the file"
end
Expand Down

0 comments on commit a68c405

Please sign in to comment.