All Projects → fixrb → fix

fixrb / fix

Licence: MIT license
Specing framework.

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to fix

mutest
A BDD testing framework for C, inspired by Mocha
Stars: ✭ 22 (-50%)
Mutual labels:  bdd-framework
selenium BDD framework
Behavioural driven development UI automation framework using selenium, cucumber-java, testng, maven, phantomjs
Stars: ✭ 34 (-22.73%)
Mutual labels:  bdd-framework
overhave
Web-framework for BDD: scalable, configurable, easy to use, based on Flask Admin and Pydantic.
Stars: ✭ 61 (+38.64%)
Mutual labels:  bdd-framework
Pester
Pester is the ubiquitous test and mock framework for PowerShell.
Stars: ✭ 2,620 (+5854.55%)
Mutual labels:  bdd-framework
Specta
A light-weight TDD / BDD framework for Objective-C & Cocoa
Stars: ✭ 2,316 (+5163.64%)
Mutual labels:  bdd-framework
Goconvey
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Stars: ✭ 6,868 (+15509.09%)
Mutual labels:  bdd-framework
Ginkgo
BDD Testing Framework for Go
Stars: ✭ 5,346 (+12050%)
Mutual labels:  bdd-framework
Cucumber
A monorepo of common components - building blocks for implementing Cucumber in various languages.
Stars: ✭ 3,299 (+7397.73%)
Mutual labels:  bdd-framework
bat
Gherkin based DSL for testing HTTP APIs via Cucumber.JS
Stars: ✭ 30 (-31.82%)
Mutual labels:  bdd-framework
hitchstory
Type-safe, StrictYAML based BDD framework for python.
Stars: ✭ 24 (-45.45%)
Mutual labels:  bdd-framework
common
A monorepo of common components - building blocks for implementing Cucumber in various languages.
Stars: ✭ 3,316 (+7436.36%)
Mutual labels:  bdd-framework
eggplant
A behaviour driven development (BDD) library for Clojure. Simplicity is key.
Stars: ✭ 16 (-63.64%)
Mutual labels:  bdd-framework
kheera-testrunner-android
BDD Framework for Android
Stars: ✭ 18 (-59.09%)
Mutual labels:  bdd-framework
bdd
JUnit 5 based BDD library to create and run stories and behaviors a.k.a BDD specification tests
Stars: ✭ 25 (-43.18%)
Mutual labels:  bdd-framework
xcuitest cucumberish
Sample Project for XCUITest + Cucumberish demo
Stars: ✭ 14 (-68.18%)
Mutual labels:  bdd-framework
SeleniumCucumber
BDD framework for automation using Selenium Cucumber and TestNg
Stars: ✭ 48 (+9.09%)
Mutual labels:  bdd-framework
Awesome-Cucumber
A collection of awesome Cucumber and Gherkin-related resources
Stars: ✭ 33 (-25%)
Mutual labels:  bdd-framework
cl-spec
BDD for Common Lisp
Stars: ✭ 18 (-59.09%)
Mutual labels:  bdd-framework
kekiri
A .NET framework that supports writing low-ceremony BDD tests using Gherkin language
Stars: ✭ 19 (-56.82%)
Mutual labels:  bdd-framework
r spec-clone.rb
A minimalist RSpec clone with all the essentials.
Stars: ✭ 38 (-13.64%)
Mutual labels:  bdd-framework

Fix

Home Version Yard documentation Ruby RuboCop License

⚠️ This project is still in the experimental phase. May be used at your own risk.

Fix specing framework for Ruby

Project goals

  • Separate specifications and examples.
  • Make specifications documents without logic.
  • Provide a rich semantic language.
  • Run each test unitarily and quickly.

Installation

Add this line to your application's Gemfile:

gem "fix", ">= 1.0.0.beta8"

And then execute:

bundle

Or install it yourself as:

gem install fix --pre

Example

Given these specifications:

# examples/duck/fix.rb

require "fix"

Fix :Duck do
  it SHOULD be_an_instance_of :Duck

  on :swims do
    it MUST be_an_instance_of :String
    it MUST eql "Swoosh..."
  end

  on :speaks do
    it MUST raise_exception NoMethodError
  end

  on :sings do
    it MAY eql "♪... ♫..."
  end
end

When we load this Duck application:

# examples/duck/app.rb
class Duck
  def walks
    "Klop klop!"
  end

  def swims
    "Swoosh..."
  end

  def quacks
    puts "Quaaaaaack!"
  end
end

And we run this test:

# examples/duck/test.rb

require_relative "app"
require_relative "fix"

Fix[:Duck].test { Duck.new }
ruby examples/duck/test.rb

We should see this output:

(irb):3 Success: expected #<Duck:0x00007fb2fa208708> to be an instance of Duck.
(irb):7 Success: expected to eq "Swoosh...".
(irb):15 NoMethodError: undefined method `sings' for #<Duck:0x00007fb2fd8371d0>.
(irb):6 Success: expected "Swoosh..." to be an instance of String.
(irb):11 Success: undefined method `speaks' for #<Duck:0x00007fb2fcc79258>.

Contact

Versioning

Fix follows Semantic Versioning 2.0.

License

The gem is available as open source under the terms of the MIT License.


This project is sponsored by Sashité:

Sashité logo Sashité logo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].