Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add console

  • Loading branch information...
commit 0b173dcf2b7634ff1a7bccf5998965ec72f6015a 1 parent 0c4df38
@ernie authored
Showing with 17 additions and 1 deletion.
  1. +10 −1 Rakefile
  2. +7 −0 spec/console.rb
View
11 Rakefile
@@ -5,4 +5,13 @@ RSpec::Core::RakeTask.new(:spec) do |rspec|
rspec.rspec_opts = ['--backtrace']
end
-task :default => :spec
+task :default => :spec
+
+desc "Open an irb session with Valium and the sample data used in specs"
+task :console do
+ require 'irb'
+ require 'irb/completion'
+ require 'console'
+ ARGV.clear
+ IRB.start
+end
View
7 spec/console.rb
@@ -0,0 +1,7 @@
+Dir[File.expand_path('../../spec/{helpers,support}/*.rb', __FILE__)].each do |f|
+ require f
+end
+
+Schema.create
+
+require 'valium'
Please sign in to comment.
Something went wrong with that request. Please try again.