Sha256: c57cfac1780546b5b80979137d86422f54025c118443e185fe13f262753e0772
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
require 'test_helper' class BaseTest < ActiveSupport::TestCase test "should return all features" do assert_equal 3, @cucumber.features.size features = ['administration.feature','change_my_data.feature','google_search.feature'] assert_equal features, @cucumber.features.map(&:file) end test "should find features by searching" do assert_equal 3, @cucumber.features.where(name: 'a').size features = ['administration.feature','change_my_data.feature','google_search.feature'] assert_equal features, @cucumber.features.where(name: 'a').map(&:file) assert_equal 'administration.feature', @cucumber.features.where(name: 'admin').file assert_equal 'change_my_data.feature', @cucumber.features.where(name: 'change').file assert_equal 'google_search.feature', @cucumber.features.where(name: 'search').file end test 'should find all steps that matches with a given term' do assert_equal 4, @cucumber.search("email").size term = 'I should see' steps = [ 'Then I should see "Invalid username/password"', 'Then I should see my personal information', 'Then I should see "Personal data successfully changed"', 'And I should see "Petter Summers"', 'I should see the following table:', 'Then I should see "The New York Times - Breaking News, World News & Multimedia"' ] assert_equal steps, @cucumber.search(term).map(&:description) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber_monitor-0.0.7 | test/base_test.rb |