30 May '14, 1pm

Writing integration tests for #elasticsearch with #RSpec (by @jsomau)

We recently started using Elasticsearch::Ruby on our project and wanted to add some rspec integration tests. The documentation skips over rspec integration but by adapting their sample tests: # Gemfile group :test do gem 'elasticsearch-extensions' end # spec_helper.rb # Add after other requires. Rake needs to be loaded. require 'rake' require 'elasticsearch/extensions/test/cluster/tasks' RSpec.configure do |config| # Snipped other config. config.before :each, elasticsearch: true do Elasticsearch::Extensions::Test::Cluster.start(port: 9200) unless Elasticsearch::Extensions::Test::Cluster.running? end config.after :suite do Elasticsearch::Extensions::Test::Cluster.stop(port: 9200) if Elasticsearch::Extensions::Test::Cluster.running? end end It’s important to namespace the index somehow so that your environments don’t clash. We used this. class User Then you can add the elast...

Full article: http://pivotallabs.com/rspec-elasticsearchruby-elasticsea...

Tweets

Tests are an implementation detail. Spread the ...

pivotallabs.com 28 May '14, 7pm

Let me back up. My client wants a new feature for their software. I’ve been doing this long enough to know that there’s a ...

FlavourSaver is the grossest Ruby gem name yet.

rubygems.org 30 May '14, 4pm

FlavourSaver is a pure-ruby implimentation of the Handlebars templating language

A Controvérsia Test::Unit vs RSpec/Cucumber:

akitaonrails.com 27 May '14, 3pm

Alguns dias atrás, o bom e velho @dhh começou uma controvérsia na comunidade. Eu diria até que foi uma discussão saudável....

Обзор значимых изменений в RSpec 3

rubyflow.ru 25 May '14, 9pm

Выход RSpec 3 уже совсем близко :) На данный момент доступен первый релиз-кандидат (RSpec 3.0.0 RC1). Проделана огроная ра...

@pcreux One could include the rspec-its Gem (se...

rubydoc.info 23 May '14, 9pm

Note: This only works if you are using rspec-expectations. Note: If you are using RSpec's newer expect-based syntax you ma...