seixasfelipe / cleaners

Cleaners - Management Application
MIT License
2 stars 0 forks source link

Run rspec features for available languages #38

Closed fraga closed 11 years ago

fraga commented 11 years ago

@seixasfelipe asked me a question on how we suppose to run rspec. Usually I do:

$ rspec -c

However, we suppose to run rspec features (yeah only features, translation is a feature that needs to be catched) for each country available in the application.

You can see the start of this work on de3f080264959c6effcc25fba5d5e90a940398c0, however I don't know how to proceed or if this is ever tested in ROR

I thought about something like:"

RSpec.configure do |config|
   config.i18n.available_locations do |locale|

and so on over rspec_helper.rb

How could we setup running feature specs for all available countries we have?

fabianoalmeida commented 11 years ago

Do you want to run all tests for all locales? Is it your question?

By the way, I'm running my tests usins autotest. It's really better because if some error occurs I can fix it and all my tests are run automatically.

fraga commented 11 years ago

can you show how you use it please?

fraga commented 11 years ago

and yes - I want to run all tests for all available locales

seixasfelipe commented 11 years ago

I don't use autotest yet, but I usually use two rake tasks that I have created: rake = will run all tests rake spec:models = will run all model tests rake spec:features = will run all feature tests

For someone that want to see all rake tasks, just run rake -T

I've created that to shortcut rspec commands with good formatting, colours, etc and sometimes I want to run only model tests because feature tests taks a little bit more to test. Of course before commit, I always run all tests to insure that everything is OK.

BTW, those rake tasks were created in 1568984f943ad75e9fe08e48f67fe0f10fd82884

fraga commented 11 years ago

you can achieve the same behaviour by using

$ rspec -c spec/features

right?

seixasfelipe commented 11 years ago

Yeah @fraga, but you can look all commands and additional options inside lib\tasks\spec.rake.

fabianoalmeida commented 11 years ago

@fraga I just run autotest on command line. I was searching how can we execute all tests using all available languages and I didn't see any interesting information. I'll keep searching. :pensive:

fraga commented 11 years ago

tks guys, I will close this for now