  Gravitational lensing can provide pure geometric tests of the structure of
space-time, for instance by determining empirically the angular diameter
distance-redshift relation. This geometric test has been demonstrated several
times using massive clusters which produce a large lensing signal. In this
case, matter at a single redshift dominates the lensing signal, so the analysis
is straightforward. It is less clear how weaker signals from multiple sources
at different redshifts can be stacked to demonstrate the geometric dependence.
We introduce a simple measure of relative shear which for flat cosmologies
separates the effect of lens and source positions into multiplicative terms,
allowing signals from many different source-lens pairs to be combined. Applying
this technique to a sample of groups and low-mass clusters in the COSMOS
survey, we detect a clear variation of shear with distance behind the lens.
This represents the first detection of the geometric effect using weak lensing
by multiple, low-mass systems. The variation of distance with redshift is
measured with sufficient precision to constrain the equation of state of the
universe under the assumption of flatness, equivalent to a detection of a dark
energy component Omega_X at greater than 99% confidence for an
equation-of-state parameter -2.5 < w < -0.1. For the case w = -1, we find a
value for the cosmological constant density parameter Omega_Lambda =
0.85+0.044-0.19 (68% C.L.), and detect cosmic acceleration (q_0 < 0) at the 98%
C.L.. We consider the systematic uncertainties associated with this technique
and discuss the prospects for applying it in forthcoming weak-lensing surveys.
