{"issue":{"created_at":"2011-11-27T22:12:25Z","state":"open","updated_at":"2011-11-28T09:37:19Z","user":{"gravatar_id":"55ddccf193d86ef28a1aab323118abb3","id":687016,"url":"https://api.github.com/users/woodlouse81","avatar_url":"https://secure.gravatar.com/avatar/55ddccf193d86ef28a1aab323118abb3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"woodlouse81"},"comments":1,"body":"On Windows 7 when I run guard it correctly runs my specs and notifies me of the result, it then also notices when I change the spec file but for some reason doesn't re-run the specs.\r\n\r\n```\r\nC:\\ruby\\apps\\ProductCompare>guard\r\n←[0mGuard is now watching at 'C:/ruby/apps/ProductCompare'←[0m\r\n←[0mGuard::Jasmine starts Rack test server on port 8888 in development environment.←[0m\r\nC:/Users/Admin/.pik/rubies/Ruby-193-p0/lib/ruby/gems/1.9.1/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher.rb:7: Use RbConfig instead of obsolete and deprecated Config.\r\n[2011-11-27 22:07:36] INFO  WEBrick 1.3.1\r\n[2011-11-27 22:07:36] INFO  ruby 1.9.3 (2011-10-30) [i386-mingw32]\r\n[2011-11-27 22:07:36] INFO  WEBrick::HTTPServer#start: pid=6804 port=8888\r\n←[0mJasmine test runner is available at http://localhost:8888/jasmine←[0m\r\n←[0m←[0mRun all Jasmine suites←[0m\r\n←[0mRun Jasmine suite at http://localhost:8888/jasmine←[0m\r\n←[0m←[0;33mWizard←[0m←[0m\r\n←[0m←[0;33m  When creating a three step wizard←[0m←[0m\r\n...\r\n←[0m←[0;31m      ? ReferenceError: Can't find variable: ChooseProductStep in coffeescripts/Wizard_spec.js on line 5←[0m←[0m\r\n←[0;31mERROR: ←[0m←[0;31m4 specs, 4 failures\r\nin 0.011 seconds←[0m\r\n#<MatchData \"spec/javascripts/coffeescripts/Wizard_spec.coffee\" 1:\"coffeescripts/Wizard\" 2:\"coffee\">\r\n←[0m←[0mRun all Jasmine suites←[0m\r\n←[0mRun Jasmine suite at http://localhost:8888/jasmine←[0m\r\n```\r\n\r\nFurther changes to the files are not picked up and the specs never appear to run.","assignee":null,"id":2362361,"number":15,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Fails to re-run jasmine specs after modification (Windows).","closed_at":null,"html_url":"https://github.com/netzpirat/guard-jasmine/issues/15","milestone":null,"url":"https://api.github.com/repos/netzpirat/guard-jasmine/issues/15"},"action":"created","comment":{"created_at":"2011-11-28T09:37:19Z","updated_at":"2011-11-28T09:37:19Z","user":{"gravatar_id":"f7badb59154ee74f13e1586e94c73d8d","id":13811,"url":"https://api.github.com/users/netzpirat","avatar_url":"https://secure.gravatar.com/avatar/f7badb59154ee74f13e1586e94c73d8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"netzpirat"},"body":"I don't think this has anything to do with the platform you're running. There are several steps from a file change to a Jasmine spec run:\r\n\r\n1. Guard detects a file change (You stated that this works fine).\r\n2. Guard may transforms the file change by evaluating your `watch` function in your `Guardfile`.\r\n3. Guard::Jasmine reads the first spec file and gets the name of the spec by extracting the description of the first `describe` function in your spec file.\r\n4. Guard::Jasmine runs the Jasmine runner, passing the spec description as `spec` query parameter.\r\n\r\nThe third step can lead to some confusion, since Jasmine doesn't know anything about a file, it just knows 'spec' function. I have just added a new section to the README:\r\n\r\n## Mapping file changes to the spec filter\r\n\r\nJasmine doesn't know anything about your test files, it only knows the name of your specs that you specify in the\r\n`describe` function. When a file change is detected, Guard::Jasmine extracts the first spec name of the file and uses\r\nthat spec description as spec filter.\r\n\r\nSo if you want to have a precise spec detection, you should:\r\n\r\n* Use only one top-level description per spec file.\r\n* Make each top-level description unique.\r\n\r\nTo get a feeling how your naming strategy works, play with the web based Jasmine runner and modify the `spec` query\r\nparameter.\r\n","id":2894775,"url":"https://api.github.com/repos/netzpirat/guard-jasmine/issues/comments/2894775"}}