diff --git a/Rakefile b/Rakefile index b82afb1..249f89b 100644 --- a/Rakefile +++ b/Rakefile @@ -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 diff --git a/spec/console.rb b/spec/console.rb index 3dd9ebc..564b5e4 100644 --- a/spec/console.rb +++ b/spec/console.rb @@ -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