No description, website, or topics provided.
Ruby
Switch branches/tags
Pull request Compare This branch is 29 commits behind openlogic:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
lib
spec
.document
.gitignore
.rspec
Gemfile
HISTORY.markdown
LICENSE.txt
README.markdown
Rakefile
VERSION

README.markdown

random-word

A random word generator intended for use in test data factories. This library uses a large list (the wordnet corpus) of english words and provides an enumerator interface to that corpus that will return the words in a random order without repeats.

Examples

General use

Random.adjs.next  #=> "pugnacious"
Random.nouns.next #=> "audience"

Factory Girl

Factory.define(:user) do |u|
  u.name  "#{RandomWord.adjs.next} User"
  u.email {|u| "#{u.name.gsub(/ +/, '.')}@example.com"
end

Factory(:user) #=> 

Machinist

User.blueprint do 
  name  { "#{sw.capitalize} User" }
  email { "#{sw}.user@example.com" }
end

Contributing to random-word

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Update history
  • Update version (remember to use semantic versioning)
  • Commit and push
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2011 OpenLogic, Peter Williams. See LICENSE.txt for further details.