jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Can't get formatters to work #302

Closed ryanlntn closed 9 years ago

ryanlntn commented 9 years ago

I must be missing something. I just can't seem to get documentation format to work. I have the following in my teaspoon_env.rb:

Teaspoon.configure do |config|
  config.formatters = "documentation"
end

And in my Guardfile:

guard :teaspoon, cmd: "spring teaspoon -f=documentation" do
  watch(%r{^app/assets/javascripts/(.+).js}) { |m| "#{m[1]}_spec" }
  watch(%r{^spec/javascripts/(.*)})
end

And yet I keep getting dot format.

Any idea what I'm doing wrong?

coderjonny commented 9 years ago

try

  config.formatters = ["documentation"]
jejacks0n commented 9 years ago

yeah, I think that's probably it.. thanks @coderjonny.

It's an array because multiple formatters can be used -- to generate artifacts and console output.

ryanlntn commented 9 years ago

Switching to config.formatters = ["documentation"] doesn't have any effect.

coderjonny commented 9 years ago

Hmm it could have something to do with that guard cmd

On Monday, February 2, 2015, Ryan Linton notifications@github.com wrote:

Switching to config.formatters = ["documentation"] doesn't have any effect.

— Reply to this email directly or view it on GitHub https://github.com/modeset/teaspoon/issues/302#issuecomment-72556077.

Jonathan Kang Software Engineer Los Angeles, California Tweets http://twitter.com/zenjonny LinkedIn https://www.linkedin.com/pub/jonny-kang/55/456/289

ryanlntn commented 9 years ago

I think you may be right. Running the same command outside of guard produces the correct format:

jejacks0n commented 9 years ago

:-/ hmmmm... I wrote the guard-teaspoon gem as a helper for people to get started, but it seems like it requires more maintenance than the community that uses it can provide. I don't use guard, and so only took an initial stab at it.

My guess is that the options that make it through to teaspoon are not correct, or are being overridden by guard -- which I believe is probably the case.

ryanlntn commented 9 years ago

Yeah it looks like there's already an issue over there too: https://github.com/modeset/guard-teaspoon/issues/33

If I get some time I might take a look at it and see if I can figure out why the options aren't making it through. If not, dot format will have to do. :wink:

jejacks0n commented 9 years ago

I think the guard-teaspoon project is overriding those things, so you may be able to configure it differently on that end.