What is a good tutorial for creating a gem with RSpec?

I searched for ways to create a gem with RSpec, but did not find descriptive guides.

I started with Ryan Bates creating a pearl , but I'm looking for a tutorial that discusses creating an act_as style style with RSpec.

According to act_as, I want to say that stone adds certain methods to an existing class in Rails. Why is it important? Since I found gem patterns like New Gem, got the specification to run, but when I try to test the Active Record object, it starts to choke. I tried to use active_record in spec_helper.rb, but I have to do something wrong because it does not solve the problem.

When it comes to plugins, I found this Rails Guide . If there is a gem version there, it will be awesome.

Thanks guys!

PS I like screencasts.

+6
ruby ruby-on-rails gem rspec
source share
2 answers

This question should have an answer about the Bundler .

As far as I know, Bundler is the most popular and used tool for easily creating skeletons of precious stones.

And here is a great tutorial on this subject:

http://rakeroutes.com/blog/lets-write-a-gem-part-one/

+1
source share

I like to use jeweler to run gems.

to create a skeleton gem with rspec

jeweler --rspec my-gem-with-rspec 
+13
source share

All Articles