RSpec vs Jasmine A very basic intro to Jasmine tests for those familiar with RSpec let/before let(:post) { Post.new("My Title", "My Content") } var post beforeEach(function() { post = new Post("My Title", "My Content") }) describe describe Post do end describe("Post", function() { // setup a post with a before block }) it it "should have a title" do expect(post.title).to eq("My Title") end it("should have a title", function() { expect(post.title).toEqual("My Title") }) stub before do Blog.stub(:add).and_return(true) end var blog beforeEach(function() { blog = new Blog() spyOn(blog, "add").andReturn(true) }) be_a expect(blog.posts.first).to be_a(Post) expect(blog.posts[0]).toEqual(jasmine.any(Post))