`
grantbb
  • 浏览: 272314 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

organize rspec2 tests into 'unit' (fast) and 'integration' (slow) categories

    博客分类:
  • Ruby
阅读更多

I wish I can use these under commands to run the tests.

 

rake spec                    # run all tests
rake spec:integration  # run all integration tests
rake spec:unit            # run all unit tests

 

So that's what I do in my Rakefile:

 

def run_test(scope)
  RSpec::Core::RakeTask.new(scope) do |t|
    t.rspec_opts = %w{--colour --format progress}
    t.pattern = "spec/#{scope.to_s}/**/*_spec.rb"
  end
end

namespace :spec do
  ENV['RACK_ENV'] = 'test'

  desc "run all unit tests"
  run_test(:unit)

  desc "run all integration tests"
  run_test(:integration)

end

desc "run all tests"
task :spec => ["spec:unit", "spec:integration"]
 
0
3
分享到:
评论

相关推荐

    Python Unit Test Automation:for Python Developers and Testers

    This book explores the important concepts in software testing and their implementation in Python 3 and shows you how to automate, organize, and execute unit tests for this language. This knowledge is ...

    Fast and Scalable Range Query Processing

    Our key idea is to organize indexing elements in a complete binary tree called PBtree, which satisfies structure indistinguishability (i.e., two sets of data items have the same PBtree structure if ...

    The Way of the Web Tester(Pragmatic,2016)

    Follow the testing pyramid and level up your skills in user interface testing, integration testing, and unit testing. Your new skills will free you up to do other, more important things while letting...

    Mastering.TypeScript.2nd.epub

    Create extensive test suites for your application, including unit testing, integration testing and browser automation with Jasmine, Protactor and Selenium Organize your application code using modules,...

    Mastering TypeScript

    Create extensive testing suites for your application, including unit testing, integration testing, and browser automation with Jasmine and Selenium Organize your application code using modules, and ...

    Mastering TypeScript - Second Edition

    Create extensive test suites for your application, including unit testing, integration testing and browser automation with Jasmine, Protactor and Selenium Organize your application code using modules,...

    POJ3007-Organize Your Train part II

    【标题】"POJ3007-Organize Your Train part II" 是北京大学在线编程平台POJ上的一道算法竞赛题目。这道题目的重点在于优化列车编组问题的解决方案,要求参赛者编写程序来解决这个问题。 【描述】题目描述可能涉及...

    DB2数据库基本操作

    load from tempfile of del modified by delprioritychar replace into TABLENAME nonrecoverable; 说明: 在不相关的数据表export数据时,可以采取并发的形式,以提高效率; TABLENAME指待清理table的名称; ...

    Odin – Inspector and Serializer v3.0.9

    With an effortless integration that deploys perfectly into pre-existing workflows, Odin allows you to serialize anything and enjoy Unity with 80+ new inspector attributes, no boilerplate code and so ...

    Python-organize文件管理自动化工具

    Python-organize是一款强大的文件管理自动化工具,它允许用户通过定义简单的规则来自动整理和组织他们的文件系统。这款工具基于Python开发,具有高度可定制性和灵活性,能够处理各种复杂的文件整理需求。 首先,...

    Rust.Essentials.2nd.Edition.epub

    It was created to solve the dilemma between high-level, slow code with minimal control over the system, and low-level, fast code with maximum system control. It is no longer necessary to learn C/C++ ...

    Dart in Action

    - **Testing**: Techniques for unit testing and integration testing to ensure the reliability and correctness of your application. #### Conclusion **Dart in Action** is an invaluable resource for ...

    Getting.started.with.Unity.2D.Game.Development.2nd.Edition.epub

    Enable yourself to structure and manage a Unity project from beginning to end, by tapping into the wisdom and experience of seasoned game development veterans Book Description Prepare yourself to ...

    Mateus Player is a complete program to listen and organize y

    Mateus Player is a complete program to listen and organize your .wav files

    Vue.js 2 Cookbook

    After that, we delve into integrating Webpack and Babel to enhance your development workflow using single file components. Finally, we take an in-depth look at Vuex for state management and Vue Router...

Global site tag (gtag.js) - Google Analytics