rake console: just load console, without rspec

and without spec_helper.

Follow-up to 2cc781e.
This commit is contained in:
Jon Atack 2016-07-24 04:13:56 +02:00
parent 2cc781e6a9
commit f2e85adece
2 changed files with 5 additions and 3 deletions

View File

@ -26,10 +26,7 @@ end
desc "Open an irb session with Ransack and the sample data used in specs"
task :console do
require 'rspec'
require File.expand_path('../spec/spec_helper.rb', __FILE__)
require File.expand_path('../spec/console.rb', __FILE__)
require File.expand_path('../spec/support/schema.rb', __FILE__)
ARGV.clear
Pry.start
end

View File

@ -3,6 +3,7 @@ require 'machinist/active_record'
require 'sham'
require 'faker'
require 'ransack'
require 'pry'
Dir[File.expand_path('../../spec/{helpers,support,blueprints}/*.rb', __FILE__)]
.each do |f|
@ -16,6 +17,10 @@ Sham.define do
salary { |index| 30000 + (index * 1000) }
tag_name { Faker::Lorem.words(3).join(' ') }
note { Faker::Lorem.words(7).join(' ') }
only_admin { Faker::Lorem.words(3).join(' ') }
only_search { Faker::Lorem.words(3).join(' ') }
only_sort { Faker::Lorem.words(3).join(' ') }
notable_id { |id| id }
end
Schema.create