简体   繁体   English

解决方案是在“开发”环境下特定于Rails / Rspec的测试用例

[英]Rails/Rspec specific test case under 'development' environment for workaround

I normally run RSpec with test environment with CircleCI. 我通常使用CircleCI在test环境中运行RSpec。

Is there any way to run specific test case under development environment for workaround. 有什么方法可以在development环境下运行特定的测试用例来解决。

PS I found some issue on rails-spec which acting up under test environment. PS我发现在rails-spec上的一些问题,该问题在测试环境下起作用。

您可以使用allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("development"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails + Rspec:如何测试环境特定的操作? 例如“......除非Rails.env.production?” - Rails + Rspec: How to test for environment specific actions? e.g. “… unless Rails.env.production?” 在Rails环境之外测试(使用RSpec)控制器 - Test (with RSpec) a controller outside of a Rails environment .env 没有被加载到 Rails 的测试环境中,使用 rspec - .env not being loaded in test environment in Rails with rspec 为什么人们在Gemfile中对rspec进行测试和开发? - Why do people group rspec under test and development in the Gemfile? Rspec - 测试rails视图呈现特定部分 - Rspec - Test that rails view renders a specific partial 如何确定我的 rails 是否在开发环境中而不是在测试环境中? - How can I determine if my rails is in the development environment and not the test environment? 如何在Rails 3下的rspec测试中访问控制器常量 - How to access a controller constant in an rspec test under Rails 3 如何在 Rails Rspec 中使用 Scope 编写唯一性测试用例 - How to write Test case for uniqueness with Scope in Rails Rspec 在Rails 4中使用rSpec在api测试用例中出错 - Got error in api test case using rSpec in Rails 4 Rails-Rspec:是否可以在shared_example中排除/删除测试用例? - Rails - Rspec: Is it possible to exclude / remove a test case in a shared_example?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM