test/lolcommits/plugin/flowdock_test.rb in lolcommits-flowdock-0.4.0 vs test/lolcommits/plugin/flowdock_test.rb in lolcommits-flowdock-0.5.0
- old
+ new
@@ -29,16 +29,16 @@
}
end
describe "#enabled?" do
it "is not enabled by default" do
- plugin.enabled?.must_equal false
+ _(plugin.enabled?).must_equal false
end
it "is true when configured" do
plugin.configuration = plugin_config
- plugin.enabled?.must_equal true
+ _(plugin.enabled?).must_equal true
end
end
describe "run_capture_ready" do
before { commit_repo_with_message("first commit!") }
@@ -54,17 +54,17 @@
output = fake_io_capture do
plugin.run_capture_ready
end
- output.must_equal "Posting to Flowdock ... done!\n"
+ _(output).must_equal "Posting to Flowdock ... done!\n"
assert_requested :post, message_url, times: 1, headers: {
'Content-Type' => /multipart\/form-data/,
'Host' => Lolcommits::Flowdock::Client::API_HOST
} do |req|
- req.body.must_match(/Content-Disposition: form-data;.+name="content"; filename="lolcommit.jpg.+"/)
- req.body.must_match(/Content-Disposition: form-data;.+name="tags\[\]"/)
+ _(req.body).must_match(/Content-Disposition: form-data;.+name="content"; filename="lolcommit.jpg.+"/)
+ _(req.body).must_match(/Content-Disposition: form-data;.+name="tags\[\]"/)
end
end
end
end
@@ -95,15 +95,15 @@
Readline.output = File.new("./test/readline/config_output.txt", "w+")
output = fake_io_capture(inputs: ["true", access_token]) do
configured_plugin_options = plugin.configure_options!
end
- output.must_match(/Enter your Flowdock organization name \(tab to autocomplete, Ctrl\+c cancels\)/)
- output.must_match(/e.g. Another, My Org/)
- output.must_match(/Enter your Flowdock flow name \(tab to autocomplete, Ctrl\+c cancels\)/)
- output.must_match(/e.g. Flowtwo, My Flow/)
+ _(output).must_match(/Enter your Flowdock organization name \(tab to autocomplete, Ctrl\+c cancels\)/)
+ _(output).must_match(/e.g. Another, My Org/)
+ _(output).must_match(/Enter your Flowdock flow name \(tab to autocomplete, Ctrl\+c cancels\)/)
+ _(output).must_match(/e.g. Flowtwo, My Flow/)
- configured_plugin_options.must_equal({
+ _(configured_plugin_options).must_equal({
enabled: true,
access_token: access_token,
organization: "myorgparam",
flow: "myflowparam"
})