lib/cypress_rails.rb in cypress_rails-0.4.0 vs lib/cypress_rails.rb in cypress_rails-0.4.1

- old
+ new

@@ -3,11 +3,23 @@ require "cypress_rails/version" require "cypress_rails/railtie" require "cypress_rails/configuration" module CypressRails + class << self + attr_accessor :configuration + end - def seeds(name) - instance_eval File.read("spec/cypress/seeds/#{name}.rb") + def self.configure + self.configuration ||= Configuration.new + yield(configuration) end - module_function :seeds + + + def scripts(name) + path = Pathname.new(configuration.scripts_path).join("#{name}.rb") + instance_eval File.read( + path + ) + end + module_function :scripts end