问题标签 [watchr]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
86 浏览

ruby-on-rails-3.2 - rails-3.2.14.rc2,spork 0.9.2,watchr-0.7 和 rspec 3.1.0 = 未初始化的常量 RSpec::Core::CommandLine (NameError)

***rails_helper.rb***

需要'spec_helper'

ActiveRecord::Migration.maintain_test_schema!

RSpec.configure 做 |config|

config.fixture_path = "#{::Rails.root}/spec/fixtures"

config.use_transactional_fixtures = true

config.infer_spec_type_from_file_location!

结尾

**spec_helper.rb**

需要“红宝石”

需要“spork”

Spork.prefork 做

ENV["RAILS_ENV"] ||= '测试'

需要 File.expand_path("../../config/environment", FILE )

需要'rspec/rails'

需要“水豚/rspec”

需要“email_spec”

需要“selenium-webdriver”

需要“webrat”

需要“webrat/core/matchers”

需要“rspec/autorun”

包括 Webrat::Methods

RSpec.configure 做 |config|

config.fixture_path = "#{::Rails.root}/spec/fixtures"

config.use_transactional_fixtures = true

config.infer_spec_type_from_file_location!

config.order = "随机"

config.before(:suite) 做

结尾

config.before(:each) 做

结尾

结尾

Spork.each_run 做

需要“factory_girl_rails”

RSpec.configure 做 |config|

结尾

结尾

Webrat.configure 做 |config|

配置模式=:机架

结尾

0 投票
1 回答
55 浏览

ruby - Watchr:main:Object 的未定义方法“watch”

我正在使用 watchr 来查看和编译我的 stylus 和 haml 文件,但是一旦我运行 watchr 命令,我就会收到一条错误消息:<main>: undefined method watch' for main:Object (NoMethodError). 我的 watchr.rb 文件看起来像这样

我该如何解决这个问题?可以修复吗?