Skip to content

Commit

Permalink
rake console: just load console, without rspec
Browse files Browse the repository at this point in the history
and without spec_helper.

Follow-up to 2cc781e.
  • Loading branch information
jonatack committed Jul 24, 2016
1 parent 2cc781e commit f2e85ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions spec/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'sham'
require 'faker'
require 'ransack'
require 'pry'

Dir[File.expand_path('../../spec/{helpers,support,blueprints}/*.rb', __FILE__)]
.each do |f|
Expand All @@ -16,6 +17,10 @@
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

0 comments on commit f2e85ad

Please sign in to comment.