This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Search courses | |
In order to ensure better utilization of courses | |
Potential students should be able to search for courses | |
Scenario: Search by topic | |
Given there are 240 courses which do not have the topic "biology" | |
And there are 2 courses A001, B205 that each have "biology" as one of the topics | |
When I search for "biology" | |
Then I should see the following courses: | |
| Course code | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^the following (.+) records?:?$/ do |factory,table| | |
# save all used factories and use the first table column as identifyer | |
@factories ||={} | |
@factories[factory.to_sym] ||={} | |
@factories[factory.to_sym][:identifyer] ||= table.headers.first | |
Factory::Attribute::Association.class_eval{attr_reader :factory} | |
associations = Factory.factory_by_name(factory).attributes.select do |attr| | |
attr.is_a?(Factory::Attribute::Association) && table.headers.include?(attr.name.to_s) | |
end | |
table.hashes.each do |hash| |