Skip to content

Commit

Permalink
Change integration spec template to assert output equality
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed May 19, 2018
1 parent eb12a73 commit 3a46023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/tty/templates/add/spec/integration/command_spec.rb.tt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RSpec.describe "`<%= app_name_underscored + ' ' + cmd_name_underscored %>` command", type: :cli do
it "executes `<%= cmd_name_underscored %> --help` command successfully" do
output = `<%= app_name_underscored + ' ' + cmd_name_underscored %> --help`
expect(output).to match <<-OUT
expect(output).to eq <<-OUT
<%- if subcmd_name_underscored.to_s.empty? -%>
Usage:
<%= app_name_underscored + ' ' + cmd_name_underscored + cmd_desc_args %>
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/add_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def server(*)
RSpec.describe "`newcli server` command", type: :cli do
it "executes `server --help` command successfully" do
output = `newcli server --help`
expect(output).to match <<-OUT
expect(output).to eq <<-OUT
Usage:
newcli server
Expand Down Expand Up @@ -249,7 +249,7 @@ class CLI < Thor

out, err, status = Open3.capture3(command_init)

expect(out).to match <<-OUT
expect(out).to eq <<-OUT
create test/integration/init_test.rb
create test/unit/init_test.rb
create lib/newcli/commands/init.rb
Expand Down Expand Up @@ -283,7 +283,7 @@ def init(*)
command_clone = "teletype add clone --no-color"
out, err, status = Open3.capture3(command_clone)

expect(out).to match <<-OUT
expect(out).to eq <<-OUT
create test/integration/clone_test.rb
create test/unit/clone_test.rb
create lib/newcli/commands/clone.rb
Expand Down

0 comments on commit 3a46023

Please sign in to comment.