{"number":1,"pull_request":{"number":1,"issue_url":"https://github.com/whilefalse/evergreen/issues/1","head":{"label":"whilefalse:fix_evergreen_rails_to_work_in_an_engine","repo":{"master_branch":null,"name":"evergreen","created_at":"2011-10-17T12:27:00Z","size":108,"clone_url":"https://github.com/whilefalse/evergreen.git","private":false,"updated_at":"2011-10-17T12:28:54Z","watchers":1,"ssh_url":"git@github.com:whilefalse/evergreen.git","url":"https://api.github.com/repos/whilefalse/evergreen","git_url":"git://github.com/whilefalse/evergreen.git","language":"Ruby","fork":true,"svn_url":"https://svn.github.com/whilefalse/evergreen","id":2591555,"pushed_at":"2011-10-17T12:28:54Z","open_issues":1,"homepage":"","description":"Run Jasmine JavaScript unit tests, integrate them into Ruby applications.","forks":0,"html_url":"https://github.com/whilefalse/evergreen","owner":{"gravatar_id":"77cfd91999abfee3323de5814749b4fb","avatar_url":"https://secure.gravatar.com/avatar/77cfd91999abfee3323de5814749b4fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/whilefalse","id":95246,"login":"whilefalse"}},"sha":"91f3cd5ef275bd4a8ff76150245b81cafd1c366d","ref":"fix_evergreen_rails_to_work_in_an_engine","user":{"gravatar_id":"77cfd91999abfee3323de5814749b4fb","avatar_url":"https://secure.gravatar.com/avatar/77cfd91999abfee3323de5814749b4fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/whilefalse","id":95246,"login":"whilefalse"}},"merged_by":null,"created_at":"2011-10-17T12:28:54Z","changed_files":3,"merged":false,"body":"In an engine, the normal behaviour is to place your tests in\r\nspec/javascripts or test/javascripts.\r\n\r\nHowever, when the app is booted, the dummy app in spec/dummy or\r\ntest/dummy is booted, so Rails.root returns <engine_path>/spec/dummy.\r\n\r\nIn this case, we want evergreen to look at <engine_path>, so we go up\r\ntwo levels from the Rails.root.\r\n\r\nI've also added some tests for the rails.rb file, as there were none\r\nbefore, and tests for this new functionality. Unfortunately it requires\r\nrails to be a development dependency since we make use of Rails::Engine\r\nand Rails::Application in the tests.\r\n\r\nI couldn't find a better way to check if we're in an engine's dummy app\r\nthan to look at the #engine_name - this is not great but there is no\r\nother way I could find.\r\n\r\nAlso, I couldn't get the entire test suite to pass after a fresh\r\ncheckout, so I'm not sure if this affects anything else.","comments":0,"title":"Fixes evergreen/rails to work out of the box in an engine.","additions":54,"diff_url":"https://github.com/whilefalse/evergreen/pull/1.diff","updated_at":"2011-10-17T12:28:54Z","url":"https://api.github.com/repos/whilefalse/evergreen/pulls/1","id":407753,"patch_url":"https://github.com/whilefalse/evergreen/pull/1.patch","mergeable":null,"merged_at":null,"commits":1,"closed_at":null,"user":{"gravatar_id":"77cfd91999abfee3323de5814749b4fb","avatar_url":"https://secure.gravatar.com/avatar/77cfd91999abfee3323de5814749b4fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/whilefalse","id":95246,"login":"whilefalse"},"deletions":0,"html_url":"https://github.com/whilefalse/evergreen/pull/1","base":{"label":"whilefalse:master","repo":{"master_branch":null,"name":"evergreen","created_at":"2011-10-17T12:27:00Z","size":108,"clone_url":"https://github.com/whilefalse/evergreen.git","private":false,"updated_at":"2011-10-17T12:28:54Z","watchers":1,"ssh_url":"git@github.com:whilefalse/evergreen.git","url":"https://api.github.com/repos/whilefalse/evergreen","git_url":"git://github.com/whilefalse/evergreen.git","language":"Ruby","fork":true,"svn_url":"https://svn.github.com/whilefalse/evergreen","id":2591555,"pushed_at":"2011-10-17T12:28:54Z","open_issues":1,"homepage":"","description":"Run Jasmine JavaScript unit tests, integrate them into Ruby applications.","forks":0,"html_url":"https://github.com/whilefalse/evergreen","owner":{"gravatar_id":"77cfd91999abfee3323de5814749b4fb","avatar_url":"https://secure.gravatar.com/avatar/77cfd91999abfee3323de5814749b4fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/whilefalse","id":95246,"login":"whilefalse"}},"sha":"1ee911f82e40d4b51c17242b4431b0ad054920a1","ref":"master","user":{"gravatar_id":"77cfd91999abfee3323de5814749b4fb","avatar_url":"https://secure.gravatar.com/avatar/77cfd91999abfee3323de5814749b4fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/whilefalse","id":95246,"login":"whilefalse"}},"state":"open"},"action":"opened"}