Skip to content

Conversation

rtlong
Copy link
Contributor

@rtlong rtlong commented Sep 14, 2011

I have implemented annotation of FactoryGirl factories, here. It works fine as long as you use the (test|spec)/factories/#{model_name}s.rb pattern. I don't intend to use the single file approach [spec/factories.rb], myself, and I would guess implementing annotation of that file would be significantly more involved, so I haven't done that bit, yet. Also, you'll have to keep your factories for a given table within one factory file.

I didn't write any specs for it, because it seems you're not using them at present. I couldn't figure out exactly what was happening with that. (If you'd like me to add some Specs, please let me know and tell me how to run them given the Rakefile.)

@ctran
Copy link
Owner

ctran commented Sep 15, 2011

Could you add a spec for this scenario? Thanks for the patch.

@rtlong
Copy link
Contributor Author

rtlong commented Sep 15, 2011

As I said before, I had planned to write specs for it, but I wasn't able to run the existing suite... In the Rakefile, you have:

require "rspec/core/rake_task" # RSpec 2.0 RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*_spec.rb' # TODO this leaves out the specs on the library itself end

When I run rake spec I see only one example run. I am quite new to RSpec, so I am totally unfamiliar with what you've got going on, there. How am I to run specs??

@ctran
Copy link
Owner

ctran commented Sep 15, 2011

Hm, looks like the specs are totally broken. I'll take this patch and fix the tests later.

ctran added a commit that referenced this pull request Sep 15, 2011
@ctran ctran merged commit 9ce1fd6 into ctran:master Sep 15, 2011
@rtlong
Copy link
Contributor Author

rtlong commented Sep 15, 2011

Okay. Feel free to ping me at that time to write specs, if you want.

@ctran ctran added the released label Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants