Sha256: cdfa02b9a3ff18f5f637c6d0266aafe53568c96ff55ca3c81dfaa8060605729a
Contents?: true
Size: 1.75 KB
Versions: 7
Compression:
Stored size: 1.75 KB
Contents
require 'test_helper' class EnginexTest < ActiveSupport::TestCase test "enginex skeleton" do run_enginex do # Root assert_file "Rakefile" assert_file "Gemfile", /gem "rails"/, /gem "capybara"/ assert_file ".gitignore", /\.bundle/, /db\/\*\.sqlite3/ # Lib assert_file "lib/demo_engine.rb", /module DemoEngine\nend/ # Vendored Rails assert_file "test/dummy/config/application.rb" assert_file "test/dummy/config/environments/test.rb", /ActionDispatch::ShowExceptions/ end end test "enginex skeleton with test_unit" do run_enginex do assert_file "test/test_helper.rb" assert_directory "test/support/" assert_directory "test/integration/" assert_file "test/demo_engine_test.rb", /assert_kind_of Module, DemoEngine/ assert_file "test/integration/navigation_test.rb", /assert_kind_of Dummy::Application, Rails.application/ end end test "enginex skeleton with rspec" do run_enginex(:rspec) do assert_file "spec/spec_helper.rb" assert_directory "spec/support/" assert_directory "spec/integration/" assert_file "spec/demo_engine_spec.rb", /DemoEngine.should be_a\(Module\)/ assert_file "spec/integration/navigation_spec.rb", /Rails.application.should be_a\(Dummy::Application\)/ end end test "enginex rakefile can create a gem" do run_enginex do execute("rake gem") assert_file "pkg/demo_engine-0.0.1.gem" end end test "enginex can run tests" do run_enginex do assert_match /2 tests, 2 assertions, 0 failures, 0 errors/, execute("rake test") end end test "enginex can run specs" do run_enginex(:rspec) do assert_match /2 examples, 0 failures/, execute("rake spec") end end end
Version data entries
7 entries across 7 versions & 1 rubygems