Sha256: ab0dbf70297529d1ebb6d0b676e487547c9cc5687eaef437ffc4363785f07ede
Contents?: true
Size: 785 Bytes
Versions: 2
Compression:
Stored size: 785 Bytes
Contents
Given "I have a form I wish to use with Rails" do |file_content| write_file 'my_form.rb', file_content end When "I run the active model lint tests for" do |instance| write_file 'test_active_model_compliance.rb', <<-TEST module Rails end begin # new hotness require 'minitest/autorun' rescue LoadError # old and busted then require 'test/unit' end require '#{ expand_path './my_form' }' base_class = if defined?(::Test) Test::Unit::TestCase else MiniTest::Unit::TestCase end class TestActiveModelCompliance < base_class include ActiveModel::Lint::Tests def model #{ instance } end end TEST run_command 'ruby -Itest test_active_model_compliance.rb' end Then "it should pass" do expect(all_stdout).to match a_string_including '0 failures' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pr-1.0.0 | features/step_definitions/active_model_steps.rb |
pr-0.0.7 | features/step_definitions/active_model_steps.rb |