So I'm working on the EdX part 2 homework 1, and I cannot seem to get save_and_open_page working.
Here's the rspec chunk:
describe 'merge action' do
before do
@article_for_merging = Factory(:article)
@article_for_merging.body = 'something we will merge'
end
it 'should merge articles' do
get :merge, 'id' => @article.id, 'merge_with' => @article_for_merging.id
response.should render_template('new')
assigns(:article).should_not be_nil
assigns(:article).should be_valid
response.should contain(/body/)
response.should contain(/extended content/)
save_and_open_page
debugger
response.should have_field('article[body]',:with => @article.body + @article_for_merging.body)
response.should have_selector('form#merge input#merge_with')
response.should have_selector('form#merge input#merge')
end
end
Other stack overflow posts suggest solutions:
http://paikialog.wordpress.com/2012/02/11/webrat-no-such-file-to-load-action_controllerintegration/
save_and_open_page (capybara / launchy) stopped working in a project - error
and I believe I have tried all, but I cannot get it to work. It's frustrating because I can view the raw HTML but with big pages it's such a pain to ferret out the html details I need - looking in browser with things like chrome's "inspect element" is SO much easier.
Whatever combination of suggested solutions I've tried I keep coming back to some variation on this error:
1) Admin::ContentController with admin connection merge action should merge articles Failure/Error: save_and_open_page LoadError: no such file to load -- action_controller/integration # ./spec/controllers/admin/content_controller_spec.rb:498:in `block (4 levels) in '
Any help very much appreciated