Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rspec failed tests #837

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/modal_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def default_options
#modals have a header, a body, a footer for options.
def modal_dialog(options = {}, &block)
opts = default_options.merge(options)
content_tag :div, :id => options[:id], :class => "bootstrap-modal modal fade" do
content_tag :div, :class => "bootstrap-modal modal fade", :id => options[:id] do
content_tag :div, :class => "modal-dialog #{opts['size']}" do
content_tag :div, :class => "modal-content" do
modal_header(options[:header], &block) +
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

it 'renders a cancel button' do
expect(modal_cancel_button("Cancel", :href => "#modal", :data => {:dismiss => 'modal'}).gsub(/\n/, "")).to eql MODAL_CANCEL_BUTTON.gsub(/\n/, "")
expect(modal_cancel_button("Cancel", :data => {:dismiss => 'modal'}, :href => "#modal").gsub(/\n/, "")).to eql MODAL_CANCEL_BUTTON.gsub(/\n/, "")
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
end
it "should pass any other options through to the link_to method" do
allow(self).to receive_message_chain("uri_state").and_return(:active)
expect(menu_item("Log out", "/users/sign_out", :class => "home_link", :method => :delete)).to eql('<li class="active"><a class="home_link" data-method="delete" href="/users/sign_out" rel="nofollow">Log out</a></li>')
expect(menu_item("Log out", "/users/sign_out", :class => "home_link", :method => :delete)).to eql('<li class="active"><a class="home_link" rel="nofollow" data-method="delete" href="/users/sign_out">Log out</a></li>')
end
it "should pass a block but no name if a block is present" do
allow(self).to receive(:current_page?) { false }
Expand Down