diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..d6bf1ab --- /dev/null +++ b/Rakefile @@ -0,0 +1,36 @@ +# encoding: utf-8 + +require 'rake' + +FileList['tasks/**/*.rake'].each { |task| import task } +desc 'run all specs' + +task :spec => ['spec:unit', 'spec:integration'] +desc 'run all integration tests' + +task :integration => ['spec:integration'] + +namespace :spec do + spec_defaults = lambda do |spec| + spec.rspec_opts = ['--options', 'spec/spec.opts'] + end + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new('unit') do |task| + spec_defaults.call(task) + task.pattern = 'spec/unit/**/*_spec.rb' +end + +RSpec::Core::RakeTask.new('integration') do |task| + spec_defaults.call(task) + task.pattern = 'spec/integration/**/*_spec.rb' +end + +RSpec::Core::RakeTask.new('coverage') do |task| + spec_defaults.call(task) + task.pattern = 'spec/{unit,integration}/*_spec.rb' +end + +end + +task :default => :spec \ No newline at end of file diff --git a/spec/spec.opts b/spec/spec.opts new file mode 100644 index 0000000..3c3f973 --- /dev/null +++ b/spec/spec.opts @@ -0,0 +1,3 @@ +--color +--order random +--format d \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8783013..aeee1d9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,3 +7,5 @@ if ENV['SIMPLECOV'] end require 'rubella' +require 'rubella/storage' +require 'rubella/input/json' \ No newline at end of file