Sha256: 5e4b44eda21e98c638d8fba46ae5fefb506d6c2b0e50a33ae8c7068b89a69dd8

Contents?: true

Size: 751 Bytes

Versions: 3

Compression:

Stored size: 751 Bytes

Contents

require_relative "base_integration_test"

include FileUtils

class TestRSpec < BaseIntegrationTest
  test_that "we can generate an app using RSpec instead of Test::Unit" do
    When { methadone "--rspec newgem" }
    Then {
      refute Dir.exist?("newgem/test")
      assert Dir.exist?("newgem/spec")
      assert File.exist?("newgem/spec/something_spec.rb")
    }
    And {
      assert_file("newgem/newgem.gemspec", contains: /add_development_dependency\(["']rspec["']/)
    }
    And {
      stdout,_ = rake("newgem", "-T")
      assert_match(/rake spec/,stdout)
      refute_match(/rake testa/,stdout)
    }
    When {
      @stdout, _ = rake("newgem","spec")
    }
    Then {
      assert_match(/1 example,.*0 failures/,@stdout)
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
methadone-2.0.2 test/integration/test_rspec.rb
methadone-2.0.1 test/integration/test_rspec.rb
methadone-2.0.0 test/integration/test_rspec.rb