Questions tagged [guard]

Guard is a command line tool to easily handle events on file system modifications.

Guard is a command line tool to easily handle events on file system modifications (FSEvent / Inotify / Polling support).

884 questions
11
votes
4 answers

Control statements in Haskell?

I am just beginning Haskell, but from all the online tutorials I've found I can't seem to find if there is one accepted way to do a conditional control statement. I have seen if-else, guards, and pattern matching, but they all seem to accomplish the…
Nate
  • 2,462
  • 1
  • 20
  • 28
11
votes
2 answers

How to get guard to only run slow specs if fast specs pass

I have tagged my specs that require selenium with :js => true in my spec files. What I want to achieve is that guard will always run the non :js specs first and only when these specs all pass run the specs tagged with :js. This is my current…
ErwinM
  • 5,051
  • 2
  • 23
  • 35
11
votes
1 answer

Jasmine lost jQuery with PhantomJS: ReferenceError: Can't find variable: $

I want to test my JS codes which uses jQuery by Jasmine in console with PhantomJS, but ReferenceError: Can't find variable: $ I can test the codes by Jasmine in browser normally. Thank you for your help. $ phantomjs examples/run-jasmine.js…
Feel Physics
  • 2,783
  • 4
  • 25
  • 38
11
votes
7 answers

Spork doesn't reload code

I am using following gems and ruby-1.9.3-p194: rails 3.2.3 rspec-rails 2.9.0 spork 1.0.0rc2 guard-spork 0.6.1 Full list of used gems is available in this Gemfile.lock or Gemfile. And I am using this configuration…
nothing-special-here
  • 11,230
  • 13
  • 64
  • 94
10
votes
1 answer

What is the function of a Spring server in RoR?

I've just finished Chapter 3 of Micheal Hartl's Ruby on Rails Tutorial. At the last portion of this chapter, he asked to configure the gitignore file to not run in conflict with the spring server "supplied by Rails to speed up loading time". I'm…
mars_
  • 121
  • 1
  • 9
10
votes
2 answers

(Rails) PaperTrail and RSpec

I'm having trouble with PaperTrail (auto-versioning of objects for Rails) being used with RSpec tests. Normally I want my tests to run without PaperTrail versioning, but there are a handful of tests for which I want PaperTrail turned on. I typically…
JacobEvelyn
  • 3,901
  • 1
  • 40
  • 51
10
votes
1 answer

include ActionDispatch::TestProcess prevents guard from reloading properly

I'm using fixture_file_upload to test some file uploads in my rspecs If I just put it in the spec I get an error for method not found. To get it working I put include ActionDispatch::TestProcess in my spec but I have found since I did that, that…
ChrisJ
  • 2,486
  • 21
  • 40
10
votes
3 answers

Disabling code coverage for guard spec runs

For a variety of reasons, I find that running code coverage every time my files reload from guard is quite a burden. However, there doesn't seem to be a way to conditionally prevent SimpleCov from starting from the spec helper. Is there a way to…
Casey Chow
  • 1,794
  • 4
  • 17
  • 29
10
votes
1 answer

differences between rubygem guard and grunt.js?

Besides the obvious language architecture differences (respectively ruby vs. nodejs) are there any differences between the rubygem guard and grunt.js? Or am i wrong comparing the two. Are they dissimilar? Also, which project has a larger development…
chrisjlee
  • 21,691
  • 27
  • 82
  • 112
10
votes
1 answer

undefined method `use_transactional_fixtures

I was following a long with this tutorial on how to test rails apps and I came across this error: /home/***/***/***/spec/spec_helper.rb:27:in `block in ': undefined method `use_transactional_fixtures=' for…
TheWebs
  • 12,470
  • 30
  • 107
  • 211
10
votes
2 answers

Can I make my own Guards in Erlang?

I came accross this code on the web: is_char(Ch) -> if Ch < 0 -> false; Ch > 255 -> false; true -> true end. is_string(Str) -> case is_list(Str) of false -> false; …
Martin Kristiansen
  • 9,875
  • 10
  • 51
  • 83
9
votes
3 answers

LiveReload not working Guard (Firefox)

I'm having a fun issue, I have LiveReload working in Chrome, so I know it's installed right, but I can't for the life of me get it going on Firefox 9.0.1. I activate the icon on my site and it just stays red, with the following symptom showing in…
Jeff Ancel
  • 3,076
  • 3
  • 32
  • 39
9
votes
2 answers

Rails, Spork and debugger

I use spork with Guard + Rspec but the debugger doesn't work as expected: I added require 'spork/ext/ruby-debug' just after the require 'spork' it properly stops on debugger breakpoints... ... but I can't access irb, it spits: Command is available…
apneadiving
  • 114,565
  • 26
  • 219
  • 213
9
votes
2 answers

Angular: Is there a way to mock the value of PLATFORM_ID in a unit test?

I am using Angular Universal. I have a guard for a route that behaves differently depending on if I am running on the server or the browser platform. Here is the guard: export class UniversalShellGuard implements CanActivate { private isBrowser:…
Paul H
  • 600
  • 1
  • 5
  • 13
9
votes
2 answers

Are multiple lets in a guard statement the same as a single let?

Is there any functional difference between: guard let foo = bar, let qux = taco else { ... } And: guard let foo = bar, qux = taco else { ... } It seems to me they're the same and the extra let is not required?
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
1 2
3
58 59