Skip to content

Commit

Permalink
Refactored to change how the source file link is presented
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jul 6, 2010
1 parent 1c86e79 commit 0caf89f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/views/common/list/_feature.html.erb
@@ -1,5 +1,5 @@
<b>Title: </b><%= feature.title %><br/>
<b>Created at: </b><%= feature.creation_date %><br/>
<% if not feature.path.nil? %>
<b>Path: </b><%= link_to "#{feature.path}", file_feature_path(feature), {:title => 'Save the original feature', :id => 'file-feature'} %>
<%= link_to "view source file", file_feature_path(feature), {:title => 'Save the original feature', :id => 'file-feature'} %>
<% end %>
2 changes: 1 addition & 1 deletion features/plain/list_pagination.feature
Expand Up @@ -2,7 +2,7 @@ Feature: All lists should have pagination functionality if there are more than 5
In order to keep the size of the lists to a minimum
As a developer
I want to be able paginate our lists

Scenario Outline: All lists with less than 5 items should have pagination
Given there are "<items>"
And there are <moreorless> than 5 "<items>"
Expand Down
4 changes: 2 additions & 2 deletions features/step_definitions/projects_steps.rb
Expand Up @@ -441,7 +441,7 @@
end

Then /^the path location should be a link$/ do
response.should have_selector :b do |content|
content.should have_selector :a, attribute = {:href => "#{RAILS_ROOT}/features/tag_cloud.feature"}
response.should have_selector :a do |content|
content.should contain 'view source file'
end
end
10 changes: 2 additions & 8 deletions spec/views/common/_sortable_list.html.erb_spec.rb
Expand Up @@ -112,15 +112,9 @@
@features.stub(:total_pages).and_return 1
render :partial => '/common/sortable_list', :locals => {:models => @features, :item_name => 'feature', :assoc => 'story', :order => true}
end

it "should display a features path" do
response.should have_selector :b do |content|
content.should contain "Path:"
end
end


it "will display the path location" do
response.should contain "Path: #{RAILS_ROOT}/features/tag_cloud.feature"
response.should contain "view source file"
end
end
end

0 comments on commit 0caf89f

Please sign in to comment.