Projects tagged ‘rspec’


Jump to tag:

Projects tagged ‘rspec’

Filtered by Project Tags rspec

Refine results Project Tags ruby (15) bdd (9) rails (7) testing (6) rubygem (6) rdoc (5) web (5) javascript (4) spec (3) test (3) tdd (3) php (3)

[26 total ]

0 Users

Javascript Mock Tool is Mock library of RSpec style. Easy use Mock or Stub object! 20090616namespace bug fix. mock("Foo.Bar").should_receive("test").with_param(1,2).and_return("2"); => ... [More] Foo.Bar.test(1,2); -> 2 20090615Mock.anything() method add. mock("Foo").should_receive("test").with_param(1,2,Mock.anything()).and_return("2"); => Foo.test(1,2,1); -> 2 Foo.test(1,2,2); -> 2 Foo.test(1,2,3); -> 2 ...... Foo.test(1,2, (any parameter) ); -> 2 20090610Initial release. Stub of JSMockTool.stub(Obj).should_receive("msg"); stub("Obj").should_receive("msg"); => Obj.msg(); stub("Obj",Stub.INSTANCE).should_receive("msg").and_return(value); => new Obj().msg(); -> valueMock of JSMockTool.mock(Obj).should_receive("msg"); mock("Obj").should_receive("msg"); => Obj.msg(); mock("Obj",Mock.INSTANCE).should_receive("msg").and_return(value1); => new Obj().msg(); -> value1 mock("Obj").should_receive("msg").with_param(1,2).and_return(value2); => Obj.msg(1,2); -> value2 mock("Obj").should_receive("msg").with_param(1,2,3).and_raise(new Error("error")); => Obj.msg(1,2,3); -> throw new Error("error"); mock("Obj").should_receive("msg").with_param(1).and_function(function(1){ alert(1); }); => Obj.msg(1); -> alert(1); [Less]
Created 4 months ago.

0 Users

Nelson analyzes a model in your Rails project and provides you with the following: 1. a method to generate a mock object with all required fields supplied; this object can be a valid or invalid ... [More] instance of the model; you can specify attributes to error on; you can override field values. 2. a file with stub! and should_receive statements for class and instance methods that can be automagically parsed 3. output of methods that could not be parsed Nelson tries to take all the pain out of mocking ActiveRecord objects. [Less]
Created about 1 year ago.

0 Users

Write and validate .NET specifications in BDD style.This framework can be used along with any other unit testing, mocking frameworks. Main purpose of this framework is to allow writing unit tests in ... [More] BDD style (similar to RSpec) Simple usage example: using System; using NUnit.Framework; namespace Demo.Spec { public class CreditCardTest : ArtSpec.Spec { /* note: override this method to define specification */ protected override void Specify() { Console.WriteLine(@"CreditCardTest demonstrates using NUnit framework"); It("should have a valid month", () => { /* note: defines expectation of an exception */ Error(delegate { new CreditCard {Month = 0}; }); Error(delegate { new CreditCard {Month = 13}; }); Error(delegate { new CreditCard {Month = -1}; }); new CreditCard {Month = 1}; new CreditCard {Month = 12}; }); It("should have a valid year", () => { Error(delegate { new CreditCard {Year = -1}; }); /* note: other unit testing frameworks can be used */ Assert.AreEqual(2009, (new CreditCard {Year = 2009}).Year); }); It("should have at least two words in the name", () => { Error(()=> new CreditCard {Name = "Sam"}); Assert.AreEqual("Sam Smith", (new CreditCard {Name = "Sam Smith"}).Name); Assert.AreEqual("Sam Smith Third", (new CreditCard { Name = "Sam Smith Third" }).Name); }); } } }This and other samples are included in the release This approach will be frozen due to a better approach demonstrated by MSpec, good job guys! It is highly recommended. ArtSpec has been tried to provide BDD for XF.Server component (http://www.kodart.com) which provides high performance for client-server applications using .NET [Less]
Created 7 months ago.

0 Users

This project is one of Ruby's Summer of Code projects. We'll be basing our specifications and infrastructure on Rubinius' specs. Right now, we will only use this site for the Wiki. Releases will ... [More] be done on the RubyTests project over at Rubyforge. [Less]
Created about 1 year ago.

0 Users

Pending...
Created 11 months ago.

0 Users

A Collection of My finest small PluginsMore of my plugins can be found at http://github.com/grosser Will Paginate Acts As SearchableIntegrate will_paginate with acts_as_searchable ... [More] Movie.paginate_by_fulltext_search(params'q',:page=>params:page,:per_page=>1) script/plugin install http://small-plugins.googlecode.com/svn/trunk/will_paginate_acts_as_searchable/ piston import http://small-plugins.googlecode.com/svn/trunk/will_paginate_acts_as_searchable/ vendor/plugins/will_paginate_acts_as_searchablePost README [Less]
Created about 1 year ago.

0 Users

a mocking and expectation test library for python, inspired by rspec readme / code: http://github.com/gfxmonk/mocktest/tree cheese shop: http://pypi.python.org/pypi/mocktest/0.1
Created 10 months ago.

0 Users

Rails SimpleDB Task List (Implemented with Amazon Web Services)This project shows a simple implementation of a task list using the following technologies: Ruby on Rails 2.02 Amazon SimpleDB Deployed ... [More] on Amazon EC2 No local database is used. No MySQL or sqlite. See the Setup for installation instructions. You will need an Amazon Web Services account. This is a rather simple project, but I think it does a decent job in demonstrating the power of handing off infrastructure to third-party utility computing services (clouds) like EC2, S3, SQS, and SimpleDB. It would be trivial to scale this application with a little bit of resource caching (calls to Amazon) and an observer. You could deploy it on n servers (in fact there are scripts that will automatically drop in new EC2 instances based on CPU load) without any concerns over database clustering. Naturally you still need to develop with data integrity in mind, and ActiveResource has no where near the attention of ActiveRecord to date, so it's not a replacement for your typical relational DB setup in most instances. Next Steps:Implement a proper caching layer at the controllers. Put a decent UI on it. Replace the proxy with direct calls to SimpleDB (we're marshalling objects twice right now). Put together the cap recipes for EC2 deployment. - Dave Rapin [Less]
Created about 1 year ago.

0 Users

rspec book cnThe purpose of this project is doing some translate Rspec official Document into Chinese. Additionaly we will collect some more interesting posts of Rspec, and tarnslate them(if en). ... [More] Our workhttp://code.google.com/p/rspec-cnbook/wiki/Overview How join the translate teamSend a mail to ysorigin Linkshttp://rspec.info/documentation/ [Less]
Created about 1 year ago.

0 Users

GScraper is a web-scraping interface to various Google Services.
Created about 1 year ago.