spec/lib/web/hooks_spec.rb in fourchette-0.1.2 vs spec/lib/web/hooks_spec.rb in fourchette-0.1.3

- old
+ new

@@ -1,16 +1,16 @@ -require "spec_helper" -require "support/sinatra_helper" -require "sucker_punch/testing/inline" +require 'spec_helper' +require 'support/sinatra_helper' +require 'sucker_punch/testing/inline' -describe "GitHub web hooks receiver" do - it "kicks an async job doing all the work" do - expected_param = { "something" => "ok" } - Fourchette::PullRequest.any_instance - .should_receive(:perform) +describe 'GitHub web hooks receiver' do + it 'kicks an async job doing all the work' do + expected_param = { 'something' => 'ok' } + expect_any_instance_of(Fourchette::PullRequest) + .to receive(:perform) .with(expected_param) - post "/hooks", + post '/hooks', expected_param.to_json, - "CONTENT_TYPE" => "application/json" + 'CONTENT_TYPE' => 'application/json' end end