Skip to content

Instantly share code, notes, and snippets.

@fellix
Created September 10, 2014 00:45
Show Gist options
  • Save fellix/c0d9539d4a4df15278d5 to your computer and use it in GitHub Desktop.
Save fellix/c0d9539d4a4df15278d5 to your computer and use it in GitHub Desktop.
turnip_helper with fixtures
require 'rails_helper'
RSpec.configure do |config|
config.before(:each, type: :feature) do
fixture_path = "#{Rails.root}/spec/fixtures"
fixtures = Dir["#{fixture_path}/**/*.yml"].map { |f| File.basename(f, '.yml') }
ActiveRecord::FixtureSet.create_fixtures(fixture_path, fixtures)
end
end
Dir["spec/acceptance/steps/**/*.rb"].each { |f| require File.join(Rails.root, f) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment