> For the complete documentation index, see [llms.txt](https://docs.hyperstack.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperstack.org/development-workflow/hyper-spec/01-installation.md).

# Installation

Add `gem 'hyper-spec'` to your Gemfile in the usual way.\
Typically in a Rails app you will add this in the test section of your Gemfile:

```ruby
group :test do
  gem 'hyper-spec', '~> 1.0.alpha1.0'
end
```

Make sure to `bundle install`.

HyperSpec is integrated with the `pry` gem for debugging, so it is recommended to add the `pry` gem as well.

HyperSpec will also use the `timecop` gem if present to allow you to control and synchronize time on the server and the client.

A typical spec\_helper file when using HyperSpec will look like this:

```ruby
# spec_helper.rb
require 'hyper-spec'
require 'pry'  # optional

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path('../test_app/config/environment', __FILE__)

require 'rspec/rails'
require 'timecop' # optional

# any other rspec configuration you need
# note HyperSpec will include chrome driver for providing the client
# run time environment
```

To load the webdriver and client environment your spec should have the `:js` flag set:

```ruby
# the js flag can be set on the entire group of specs, or a context
describe 'some hyper-specs', :js do
  ...
end

# or for an individual spec
  it 'an individual hyper-spec', :js do
    ...
  end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperstack.org/development-workflow/hyper-spec/01-installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
