GithubHelp home page GithubHelp logo

ikedaisuke / rushcheck Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 5.0 255 KB

A lightweight (but tricky) random testing tool for Ruby

Home Page: http://rushcheck.rubyforge.org/

License: MIT License

Ruby 100.00%

rushcheck's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rushcheck's Issues

Simple test program raises "undefined method 'gen'". Caused by Claim wanting bblock to return a value?

quotes from rubyforge.org as a ticket referred to #15957

http://rubyforge.org/tracker/index.php?func=detail&aid=15957&group_id=2027&atid=7885

Hi,

When I run the below program, I get an "NoMethodError: undefined method 'gen'". I have experimented, and notice
that the problem goes away as soon as I add a statement to the block so it returns a value.

My perception was that RushCheck::Claim does NOT check the block's return value. Is my perception incorrect, or is there
a bug in RushCheck?

Please your comment,

Thanks,

Frank


require 'rushcheck'
require 'test/unit'

def for_all(*cs, &f)
  assert RushCheck::Claim.new(*cs, &f).check
end

class ArrayTest < Test::Unit::TestCase

  def test_array  
    for_all(Integer) do |item|
      array= Array.new
      array.push item
      assert !array.empty? # not ok
    end
  end
end

example for custom instances

I need to limit the range of integers. I figured out how to do this in rantly with the range method. I have no idea how to in rushcheck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.