Have you ever heard of SEMA? It’s a fairly esoteric system for measuring how good a software team is. No, wait! Don’t follow that link! It will take you about six years just to understand that stuff. So I’ve come up with my own, highly irresponsible, sloppy test to rate the quality of a software team. The great part about it is that it takes about 3 minutes. With all the time you save, you can go
Marnen E. Laibow-Koser September 2010, revised June 2012 Why do we need it? Many Web applications call remote services Good testing practice requires us to test these calls How do we test this code? class Twitter include HTTParty def self.user_info(username, format = :json) get "http://api.twitter.com/1/users/show/#{username}.#{format}" end end The obvious approach Call the external service and ma
How I learned to test my Rails applications, Part 4: Controller specs Controller testing has been soft-deprecated in Rails, but you're still likely to see controller specs in many Rails codebases. The basics covered in this post still apply. Be sure to read my posts on replacing controller specs with feature specs and request specs for an up-to-date take on testing your code. Thanks! Poor controll
Our code: describe "GET show" do it "assigns the requested subcategory as @subcategory" do subcategory = Subcategory.create! valid_attributes get :show, :id => subcategory.id.to_s assigns(:subcategory).should eq(subcategory) end it "has a sort parameter in the url" do subcategory = Subcategory.create! valid_attributes get :show, {:id => subcategory.id.to_s, :params => {:sort => 'title'}} helper.pa
About V2 Serverspec/Specinfra v2 has been just released. See the document about v2. About With Serverspec, you can write RSpec tests for checking your servers are configured correctly. Serverspec tests your servers’ actual state by executing command locally, via SSH, via WinRM, via Docker API and so on. So you don’t need to install any agent softwares on your servers and can use any configuration
What is Better Specs Better Specs is a collection of best practices developers learned while testing apps that you can use to improve your coding skills, or simply for inspiration. Better Specs came to life at Lelylan (open source IoT cloud platform) and checking out its test suite may be of inspiration. Better Specs focus on Rails testing, but our goal is to create testing guidelines covering mos
simple and powerful object generation for Ruby Getting Started What is Fabrication? Fabrication generates objects in Ruby. Fabricators are schematics for your objects, and can be created as needed anywhere in your app or specs. Fabrication can generate anything, but has specific support for ActiveRecord Models, Mongoid Documents, Sequel Models, and DataMapper Resources. Installation Fabrication is
コード比較 旧 describe User do it "should be instance of User" do Factory.create(:user).should be_instance_of(User) end it "should belongs to Guild" do Factory.create(:user).guild.should be_instance_of(Guild) end describe "#add_exp(experience_point)" do it "should not raise error" do lambda{Factory.create(:user).add_exp(10) }.should_not raise_error end end describe "::get_list()" do it "should be instan
Rails application preloader といえば spork や zeus を使っている人もいるかと思います。 今後、期待できる preloader として spring を教えてもらいました。 springはzeusと類似していますが、springはrubyで実装されています。Railsに綿密に統合されているのが他のプリローダーと比較すると大きな特徴です。 Railsコミッターが開発していることからも、今後期待できるpreloaderです。 インストールGemfileにspringを追加します。 group :development, :test do gem 'spring' end$ bundleこれでgemが導入されます。 利用方法springの簡単な使い方です。 $ bundle exec spring Usage: spring COMMAND [ARGS] T
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く