spec/views/spotlight/appearances/edit.html.erb_spec.rb in blacklight-spotlight-0.1.0 vs spec/views/spotlight/appearances/edit.html.erb_spec.rb in blacklight-spotlight-0.2.0
- old
+ new
@@ -1,20 +1,20 @@
require 'spec_helper'
module Spotlight
- describe "spotlight/appearances/edit" do
+ describe "spotlight/appearances/edit", :type => :view do
let(:exhibit) { FactoryGirl.create(:exhibit) }
let(:appearance) { Spotlight::Appearance.new(exhibit.blacklight_configuration) }
before do
assign(:exhibit, exhibit)
assign(:appearance, appearance)
- view.stub(current_exhibit: exhibit)
+ allow(view).to receive_messages(current_exhibit: exhibit)
end
it "should have a disabled relevance sort option" do
render
- expect(rendered).to have_selector "input[name='appearance[sort_fields][relevance]'][disabled='disabled']"
+ expect(rendered).to have_selector "input[name='appearance[sort_fields][relevance][enable]'][disabled='disabled']"
end
end
end