# Writing expressive RSpec tests for Ruby objects and Rails views

DevFeed: [Writing expressive RSpec tests for Ruby objects and Rails views](<https://devfeed.tech/articles/spec-tacular-ways-to-think-about-writing-expressive-rspec-30006.md>)

Original publisher: [Read original article](<https://engineering.freeagent.com/2026/07/07/spec-tacular-ways-to-think-about-writing-expressive-rspec/>)

Author: Simon Fish

Published: 2026-07-07T13:26:00Z

Content type: tutorial

Language: en

Sources: [FreeAgent](<https://devfeed.tech/sources/freeagent.md>)

Topics: [RSpec](<https://devfeed.tech/topics/rspec.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [render](<https://devfeed.tech/topics/render.md>)

Tags: [rails](<https://devfeed.tech/tags/rails.md>), [render](<https://devfeed.tech/tags/render.md>), [rspec](<https://devfeed.tech/tags/rspec.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [ruby-on-rails](<https://devfeed.tech/tags/ruby-on-rails.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tooling](<https://devfeed.tech/tags/tooling.md>)

## AI overview

The article explains how to use RSpec expressively to separate test phases, clarify expected behavior, and document interfaces. It also discusses why this approach needs adjustment when testing Rails views, which are rendered templates rather than ordinary Ruby objects.

## Source excerpt

Using RSpec's functionality expressively helps to draw focus to the right parts of a test, but it's not always easy to understand how best to use it.