Skip to content

Instantly share code, notes, and snippets.

require "spec_helper"
describe TabsCell, "show", :type => :cell_controller do
before( :each ) do
@cell = TabsCell.new
@selected_tab_title = "Tab Article"
assign_to_cell( :selected_tab_title, @selected_tab_title )
@tab_articles = mock( :tab_articles_relation )
require "spec_helper"
describe "tabs/show.html.haml", :type => :cell_view do
before( :each ) do
@tab_articles = [ Factory.stub( :tab_article, tab_title: "Home", url_title: "home" ),
Factory.stub( :tab_article, tab_title: "Title One", url_title: "title_one" ),
Factory.stub( :tab_article, tab_title: "Title Two", url_title: "title_two" ),
Factory.stub( :tab_article, tab_title: "Title Three", url_title: "title_three" ) ]
@selected_tab_title = "Title Two"
require "rubygems"
require "csv"
require "json"
unless $testing
Shoes.setup do
# gem "yajl-ruby"
gem "json"
end
end
require "cells/assertions_helper"
module CellViewHelpers
include Cells::AssertionsHelper
alias_method( :old_render_cell, :render_cell )
def render_cell( *args )
html = old_render_cell( *args )
render( text: html )
describe "Something" do
before( :each ) do
Kernel.stub!( :rand ).and_return( 0 )
end
def do_call
MyObject.do_something
end
# Generated by cucumber-sinatra. (2011-02-01 22:03:41 +0000)
ENV['RACK_ENV'] = 'test'
require File.join(File.dirname(__FILE__), '..', '..', 'lib/my_app.rb')
require 'capybara'
require 'capybara/cucumber'
require 'rspec'
require "rack/test"
require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'rspec'
require 'rack/test'
# set test environment
Sinatra::Base.set :environment, :test
Sinatra::Base.set :run, false
Sinatra::Base.set :raise_errors, true
/Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/sinatra-1.1.2/lib/sinatra/base.rb:1050:in `define_method': tried to create Proc object without a block (ArgumentError)
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/sinatra-1.1.2/lib/sinatra/base.rb:1050:in `compile!'
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/sinatra-1.1.2/lib/sinatra/base.rb:1036:in `route'
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/sinatra-1.1.2/lib/sinatra/base.rb:1019:in `get'
from (__DELEGATE__):2:in `get'
from /Users/douglivesey/work/sinatra/highscoregasm/spec/lib/highscoregasm_spec.rb:24:in `block (2 levels) in <top (required)>'
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/rspec-core-2.4.0/lib/rspec/core/example_group.rb:131:in `module_eval'
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highscoregasm/gems/rspec-core-2.4.0/lib/rspec/core/example_group.rb:131:in `subclass'
from /Users/douglivesey/.rvm/gems/ruby-1.9.2-p0@highsc
ENV['RACK_ENV'] = 'test'
require 'rubygems'
require 'bundler'
Bundler.setup
require 'rack/test'
require_relative '../lib/highscoregasm.rb'
module RSpecMixinExample
require_relative "../spec_helper"
describe "Highscoregasm" do
describe "/my_test_page" do
get "/my_test_page"
last_response.status.should == 200
end
end