Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

What about having some rspec tests? #5

Closed
Javierchik opened this Issue Mar 5, 2012 · 7 comments

Comments

Projects
None yet
4 participants

No description provided.

Contributor

mikelarkin commented Mar 13, 2012

I'm actually fixing another issue and am adding some basic unit test coverage since that's more universal.

Contributor

mikelarkin commented May 2, 2012

I added some basic testing, but it doesn't cover everything of course.

Contributor

maetl commented May 12, 2012

Thanks for this. I’m going to take a look at these tests and see if the fakeweb and unit test approach is something we can use as a base to start actually evolving this gem into something usable. Decoupling the library from requiring a live store seems like a good idea and the perfect place to start.

Contributor

maetl commented May 12, 2012

Is there any reason why we would definitely want to use Rspec and not Test::Unit?

Contributor

mikelarkin commented May 12, 2012

Rspec, FactoryGirl, etc are useful tools for sure, the only tricky part I've found is when you're using different version of Ruby (Rspec 2 is Ruby 1.9.3 and sometimes you can trick it to work on 1.8.7).

So, for the gem to be generic we'd need to make sure the specs work in both versions of Ruby, which might be more trouble then it's worth when Fakeweb / Test::Unit works well enough for the simple things we test.

Contributor

maetl commented May 13, 2012

After thinking about this a bit more, I am actually tending back towards @Javierchik’s original suggestion. Reason is, we actually use Rspec and Cucumber internally at BigCommerce. While I prefer Test::Unit for writing Ruby libraries and unit testing, it might actually be good in the long term (aka: completing this Gem) to represent the API calls as user stories.

I am happy with Fakeweb/Test::Unit, and will run with that for the time being.

Contributor

maetl commented Jan 14, 2013

Thanks @damncabbage!

@maetl maetl closed this Jan 14, 2013

@pedelman pedelman added the v0.x label Mar 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment