Need advice about which tool to choose?Ask the StackShare community!

RSpec

2.6K
195
+ 1
0
RuboCop

1.1K
216
+ 1
41
Add tool
Decisions about RSpec and RuboCop
Weverton Timoteo

To communicate isn’t just getting rid of syntax errors and making code work. The code should communicate ideas to people through a programming language that computers can also understand.

You should adopt semantic variables, classes, modules, and methods names. For instance, in Ruby, we avoid using particular prefixes such as is_paid, get_name and set_name. In their places, we use directly paid?, name, and name=.

My advice is to use idiomatic and features that the programming language you use offers to you whenever possible, and figure out ways to better pass the message.

Why wouldn’t we be worried about semantics, typos, and styles? We should care for the quality of our code, and the many concepts that define it. You can start by using a linter to collect some issues from your codebase automatically.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of RSpec
Pros of RuboCop
    Be the first to leave a pro
    • 9
      Open-source
    • 8
      Completely free
    • 7
      Runs Offline
    • 4
      Follows the Ruby Style Guide by default
    • 4
      Can automatically fix some problems
    • 4
      Customizable
    • 2
      Atom package
    • 2
      Integrates with Vim/Emacs/Atom/Sublime/
    • 1
      Integrates With Custom CMS

    Sign up to add or upvote prosMake informed product decisions

    What is RSpec?

    Behaviour Driven Development for Ruby. Making TDD Productive and Fun.

    What is RuboCop?

    RuboCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use RSpec?
    What companies use RuboCop?
    See which teams inside your own company are using RSpec or RuboCop.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with RSpec?
    What tools integrate with RuboCop?
    What are some alternatives to RSpec and RuboCop?
    Cucumber
    Cucumber is a tool that supports Behaviour-Driven Development (BDD) - a software development process that aims to enhance software quality and reduce maintenance costs.
    Capybara
    Capybara helps you test web applications by simulating how a real user would interact with your app. It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in. WebKit is supported through an external gem.
    InSpec
    It is an open-source testing framework for infrastructure with a human- and machine-readable language for specifying compliance, security and policy requirements.
    pytest
    A framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. It is a mature full-featured Python testing tool.
    Selenium
    Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
    See all alternatives