Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Cucumber save and open page issue
require 'rubygems'
require 'cucumber/rails'
require 'capybara/rails'
Capybara.default_selector = :css
ActionController::Base.allow_rescue = false
DatabaseCleaner.strategy = :transaction
rescue NameError
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
require 'factory_girl/step_definitions'
Cucumber::Rails::Database.javascript_strategy = :truncation
Dir["../../spec/factories/*.rb"].each {|file| require_relative file }
Given /^a no fee license called "([^"]*)"$/ do |arg1|
@l = FactoryGirl.create(:license,
name: arg1,
status: License::PUBLISHED_STATUS,
way: License::CLICK_WAY,
express_license_technology_id: 1,
fee: 154,
allocation_rule_number: 66,
licensefile: +
Given /^a technology called "([^"]*)"$/ do |arg1|
@t = FactoryGirl.create(:express_license_technology,
name: arg1,
status: ExpressLicenseTechnology::PUBLISHED_STATUS)
When /^I am on the license page for "([^"]*)"$/ do |arg1|
@l= License.find_by_name(arg1)
Feature: No Fee License
In order to license a technology without a fee
As a site visitor
I want execute a license
Given a technology called "test no fee license tech"
And a no fee license called "test no fee license"
Scenario: no fee license collects licensee info
When I am on the license page for "test no fee license"
Then I should see a form for licensee info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment