Wawa Loo
Wawa Loo

Reputation: 2276

How to create and test a gem with Rspec and Cucumber

I have created a model that I use across applications.

module WeblabOnRails
  class TimeOnly
    #...
  end
end

I put the code in my lib/weblab_on_rails/time_only.rb and I invoke it, each time from application.rb.

I would like to integrate that code into a gem and write tests using Rspec and Cucumber. I am using Rails 3.2.5.

Upvotes: 1

Views: 141

Answers (1)

carpamon
carpamon

Reputation: 6633

I recommend you using bundler to create and publish gems. Check out this RailsCast: http://railscasts.com/episodes/245-new-gem-with-bundler. Once you created your gem project you can use RSpec, Cucumber or whatever to test it.

Upvotes: 1

Related Questions