Permalink
Browse files

- first working version

  • Loading branch information...
1 parent 3492b79 commit 9e9294cf731614de5220751057c764af62472f29 @martinciu committed Jun 27, 2010
Showing with 335 additions and 1,675 deletions.
  1. +2 −1 Gemfile
  2. +11 −20 Rakefile
  3. +304 −278 lib/state_machine/integrations/mongoid.rb
  4. +18 −9 state_machine-mongoid.gemspec
  5. +0 −21 test/helper.rb
  6. +0 −1,346 test/test_state_machine-mongoid.rb
View
@@ -1,8 +1,9 @@
source :rubygems
+gem "bson_ext", "1.0.1"
gem "mongoid", ">=2.0.0.beta7"
gem "state_machine", ">=0.9.2"
gem "activemodel", ">=3.0.0.beta4", :require => "active_model"
group :development do
- gem "test-unit"
+ gem "rspec"
end
View
@@ -7,41 +7,32 @@ begin
Jeweler::Tasks.new do |gem|
gem.name = "state_machine-mongoid"
gem.summary = %Q{state_machine mongoid integration}
- gem.description = %Q{TODO: longer description of your gem}
+ gem.description = %Q{a little lack of tests but it works!}
gem.email = "marcin.ciunelis@gmail.com"
gem.homepage = "http://github.com/martinciu/state_machine-mongoid"
gem.authors = ["Marcin Ciunelis"]
gem.add_bundler_dependencies
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
end
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
- end
-rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
- end
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
-task :test => :check_dependencies
+task :spec => :check_dependencies
-task :default => :test
+task :default => :spec
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
Oops, something went wrong.

0 comments on commit 9e9294c

Please sign in to comment.