On Jun 3, 2008, at 11:31 AM, Ben Mabey wrote:

Pat Maddox wrote:
On Mon, Jun 2, 2008 at 11:09 PM, Jose Fernandez <[EMAIL PROTECTED] forum.com> wrote:

I can't figure out how to build rspec-rails as a gem when just cloned
from github... there isn't any .gemspec file or rake task that does
this. Any help?


rspec-rails is a rails plugin, not a gem.

Pat
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


I have needed to use it as a gem before. Why? Well, with ticket 383(http://rspec.lighthouseapp.com/projects/5645/tickets/383-extract-mock_model-out-of-railsexamplegroup ) David extracted the mocking features for AR so that it could be reused easily. I was writing a merb app that used AR and I quickly began missing the mock_model and other mock helpers found in rspec- rails. So, I created a gem out of the plugin, installed it locally in my merb app I just required 'spec/rails/mocks'.


The gemspec file I created to do this was:

Gem::Specification.new do |s|
s.name = %q{rspec-rails}
s.version = "1.1.4"

s.specification_version = 2 if s.respond_to? :specification_version=

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["RSpec Development Team"]
s.date = %q{2008-05-25}
s.default_executable = %q{spec}
s.description = %q{RSpec-Rails is an extension to RSpec to provide a better environment for specing rails.}
s.email = [EMAIL PROTECTED]
s.extra_rdoc_files = ["README", "CHANGES", "MIT-LICENSE"]
s.files = ["CHANGES", "MIT-LICENSE", "Rakefile", "README", "lib/ autotest/discover.rb", "lib/autotest/rails_rspec.rb", "lib/spec/ rails/example/assigns_hash_proxy.rb", "lib/spec/rails/example/ controller_example _group.rb", "lib/spec/rails/example/functional_example_group.rb", "lib/spec/rails/example/helper_example_group.rb", "lib/spec/rails/ example/model_example_group.rb", "lib/spec/rails/example/ rails_example_group.r b", "lib/spec/rails/example/render_observer.rb", "lib/spec/rails/ example/view_example_group.rb", "lib/spec/rails/example.rb", "lib/ spec/rails/extensions/action_controller/base.rb", "lib/spec/rails/ extensions/ac tion_controller/rescue.rb", "lib/spec/rails/extensions/ action_controller/test_response.rb", "lib/spec/rails/extensions/ action_view/base.rb", "lib/spec/rails/extensions/active_record/ base.rb", "lib/spec/rails/ex tensions/object.rb", "lib/spec/rails/extensions/spec/example/ configuration.rb", "lib/spec/rails/extensions/spec/matchers/ have.rb", "lib/spec/rails/extensions.rb", "lib/spec/rails/matchers/ assert_select.rb", "li b/spec/rails/matchers/have_text.rb", "lib/spec/rails/matchers/ include_text.rb", "lib/spec/rails/matchers/redirect_to.rb", "lib/ spec/rails/matchers/render_template.rb", "lib/spec/rails/ matchers.rb", "lib/spec/ra ils/mocks.rb", "lib/spec/rails/story_adapter.rb", "lib/spec/rails/ version.rb", "lib/spec/rails.rb"]
s.has_rdoc = true
s.homepage = %q{http://rspec.rubyforge.org}
s.rdoc_options = ["--title", "RSpec-Rails", "--line-numbers", "-- inline-source", "--main", "README"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.1.0}
s.summary = %q{RSpec-Rails-1.1.4 (build 20080526202855) - BDD for Ruby http://rspec.rubyforge.org/}
end


I can grab this and add it or, if you want, you can gimme a git-patch. Your call.

Cheers,
David
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to